How to use ejecutar_script method in SeleniumBase

Best Python code snippet using SeleniumBase

modeloDatos.py

Source:modeloDatos.py Github

copy

Full Screen

...116 cursor.execute(sql, (id,))117 self.conexion.commit()118 cursor.close()119 120 def ejecutar_script(self,sql):121 """ Ejecuta varias sentencia SQL, sin retornar algun valor"""122 cursor = self.conexion.cursor()123 cursor.executescript(sql)124 self.conexion.commit()125 cursor.close()126 #cursor.Close127 128 129 130 def insertarIndicador(self, d1):131 """ Inserta un nuevo registro en la base de datos132 en la tabla Indicadores. """133 #datos1 = (Nodo1, Nodo2, NuevoIndicador,DistanciaIngresada)134 cursor = self.conexion.cursor()135 N=[d1[0],d1[1],d1[2],d1[3]]136 sql = '''INSERT INTO Indicadores (Id_Nodo1,Id_Nodo2,NOMBRE,DISTANCIA) VALUES (?, ?, ?, ?);'''137 cursor.execute(sql, N)138 self.conexion.commit()139 cursor.close()140 141 def eliminarIndicador(self, indicador):142 """ Elimina un indicador de la base de datos """143 cursor = self.conexion.cursor()144 #sql = '''DELETE FROM Indicador WHERE Nombre=?;'''145 cursor.execute('''DELETE FROM Indicadores WHERE Nombre=?;''', (str(indicador),))146 #cursor.execute(sql, (indicador,))147 self.conexion.commit()148 cursor.close()149 150 def eliminarNodoConIndicador(self, idNodo1,idVecino):151 """ Elimina un indicador de la base de datos """152 cursor = self.conexion.cursor()153 #sql = '''DELETE FROM Indicador WHERE Nombre=?;'''154 cursor.execute('''DELETE FROM Indicadores WHERE Id_Nodo1=? and Id_Nodo2=?;''', (str(idNodo1),str(idVecino),))155 #cursor.execute(sql, (indicador,))156 self.conexion.commit()157 cursor.close()158 159 #Se cargan los datos del circuito si este no ha sido creado160 def crearTabla(self):161 162 sql='''create table if not exists Nodos 163 (Id_Nodo INTEGER PRIMARY KEY AUTOINCREMENT,164 Nombre TEXT NOT NULL,165 Troncal INTEGER NOT NULL);166 167 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B1', 1);168 169 create table if not exists Lineas170 (Id_linea INTEGER PRIMARY KEY AUTOINCREMENT,171 Id_Nodo1 INTEGER,172 Id_Nodo2 INTEGER,173 R0 FLOAT,174 R1 FLOAT,175 X0 FLOAT,176 X1 FLOAT,177 DISTANCIA FLOAT);178 179 create table if not exists Cargas180 (Id_carga INTEGER PRIMARY KEY AUTOINCREMENT,181 Id_Nodo INTEGER NOT NULL,182 ALIAS TEXT,183 P FLOAT,184 Q FLOAT);185 186 create table if not exists Indicadores187 (Id_indicador INTEGER PRIMARY KEY AUTOINCREMENT,188 Id_Nodo1 INTEGER,189 Id_Nodo2 INTEGER,190 NOMBRE TEXT,191 DISTANCIA FLOAT);192 193 CREATE TRIGGER relacion_nodo_linea AFTER INSERT ON Nodos194 BEGIN195 INSERT INTO Lineas (Id_Nodo1) VALUES (new.Id_Nodo);196 END;197 198 CREATE TRIGGER relacion_nodo_carga AFTER INSERT ON Nodos199 BEGIN200 INSERT INTO Cargas (Id_Nodo,ALIAS) VALUES (new.Id_Nodo,new.Nombre);201 END;202 203 '''204 self.ejecutar_script(sql)205 206 #Se cargan los datos del circuito si este no ha sido creado207 def autollenadoYacopi(self):208 sql='''209 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B1p', 1);210 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B2', 1);211 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B2p', 1);212 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B3', 1);213 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B3p', 1);214 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B4', 1);215 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B4p', 1);216 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B5', 1);217 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B5p', 1);218 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B6', 1);219 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B6p', 1);220 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B7', 1);221 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B7p', 1);222 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B8', 1);223 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B8p', 1);224 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B9', 1);225 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B9p', 1);226 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B10', 1);227 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B10p', 1);228 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B11', 1);229 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB2p', 0);230 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB2', 0);231 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB3p', 0);232 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB3', 0);233 234 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB4p', 0);235 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB4', 0);236 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB5p', 0);237 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB5', 0);238 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB6p', 0);239 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB6', 0);240 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB7p', 0);241 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB7', 0);242 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB8p', 0);243 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB8', 0);244 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB9p', 0);245 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB7k', 0);246 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB7kp', 0);247 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB9', 0);248 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB10p', 0);249 INSERT INTO Nodos (Nombre, Troncal) VALUES ('RB10', 0);250 251 UPDATE Lineas set Id_Nodo2 = 1, R0 =0.69609, R1 =0.3714, X0 =1.5611,X1 =0.58378, DISTANCIA = 0.224281 where Id_Nodo1=2;252 UPDATE Lineas set Id_Nodo2 = 2, R0 =0.83831, R1 =0.36938, X0 =1.3863,X1 =0.53144, DISTANCIA = 0.039579 where Id_Nodo1=3;253 254 UPDATE Lineas set Id_Nodo2 = 3, R0 =0.69609, R1 =0.3714, X0 =1.5611,X1 =0.58378, DISTANCIA = 8.4354 where Id_Nodo1=4;255 UPDATE Lineas set Id_Nodo2 = 4, R0 =0.83831, R1 =0.36938, X0 =1.3863,X1 =0.53144, DISTANCIA = 1.4886 where Id_Nodo1=5;256 257 UPDATE Lineas set Id_Nodo2 = 5, R0 =0.69609, R1 =0.3714, X0 =1.5611,X1 =0.58378, DISTANCIA = 2.6401 where Id_Nodo1=6;258 UPDATE Lineas set Id_Nodo2 = 6, R0 =0.83831, R1 =0.36938, X0 =1.3863,X1 =0.53144, DISTANCIA = 0.4659 where Id_Nodo1=7;259 260 UPDATE Lineas set Id_Nodo2 = 7, R0 =0.69609, R1 =0.3714, X0 =1.5611,X1 =0.58378, DISTANCIA = 6.85695 where Id_Nodo1=8;261 UPDATE Lineas set Id_Nodo2 = 8, R0 =0.83831, R1 =0.36938, X0 =1.3863,X1 =0.53144, DISTANCIA = 1.21005 where Id_Nodo1=9;262 263 UPDATE Lineas set Id_Nodo2 = 9, R0 =0.69609, R1 =0.3714, X0 =1.5611,X1 =0.58378, DISTANCIA = 2.4837 where Id_Nodo1=10;264 UPDATE Lineas set Id_Nodo2 = 10, R0 =0.83831, R1 =0.36938, X0 =1.3863,X1 =0.53144, DISTANCIA = 0.4383 where Id_Nodo1=11;265 UPDATE Lineas set Id_Nodo2 = 11, R0 =0.7339, R1 =0.55625, X0 =1.9162,X1 =0.48394, DISTANCIA = 2.89255 where Id_Nodo1=12;266 UPDATE Lineas set Id_Nodo2 = 12, R0 =0.7339, R1 =0.55625, X0 =1.7505,X1 =0.56677, DISTANCIA = 0.51045 where Id_Nodo1=13;267 UPDATE Lineas set Id_Nodo2 = 13, R0 =0.7339, R1 =0.55625, X0 =1.9162,X1 =0.48394, DISTANCIA = 1.25885 where Id_Nodo1=14;268 UPDATE Lineas set Id_Nodo2 = 14, R0 =0.7339, R1 =0.55625, X0 =1.7505,X1 =0.56677, DISTANCIA = 0.22215 where Id_Nodo1=15;269 UPDATE Lineas set Id_Nodo2 = 15, R0 =0.7339, R1 =0.55625, X0 =1.9162,X1 =0.48394, DISTANCIA = 3.7162 where Id_Nodo1=16;270 UPDATE Lineas set Id_Nodo2 = 16, R0 =0.7339, R1 =0.55625, X0 =1.7505,X1 =0.56677, DISTANCIA = 0.6558 where Id_Nodo1=17;271 UPDATE Lineas set Id_Nodo2 = 17, R0 =0.7339, R1 =0.55625, X0 =1.9162,X1 =0.48394, DISTANCIA = 3.1708145 where Id_Nodo1=18;272 UPDATE Lineas set Id_Nodo2 = 18, R0 =0.7339, R1 =0.55625, X0 =1.7505,X1 =0.56677, DISTANCIA = 0.5595555 where Id_Nodo1=19;273 UPDATE Lineas set Id_Nodo2 = 19, R0 =0.7339, R1 =0.55625, X0 =1.9162,X1 =0.48394, DISTANCIA = 8.8518235 where Id_Nodo1=20;274 UPDATE Lineas set Id_Nodo2 = 20, R0 =0.7339, R1 =0.55625, X0 =1.7505,X1 =0.56677, DISTANCIA = 1.5620865 where Id_Nodo1=21;275 276 UPDATE Lineas set Id_Nodo2 = 3, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 3.6564535 where Id_Nodo1=22;277 UPDATE Lineas set Id_Nodo2 = 22, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.6452565 where Id_Nodo1=23;278 UPDATE Lineas set Id_Nodo2 = 5, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 6.5409982 where Id_Nodo1=24;279 UPDATE Lineas set Id_Nodo2 = 24, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 1.1542938 where Id_Nodo1=25;280 UPDATE Lineas set Id_Nodo2 = 7, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 3.7357245 where Id_Nodo1=26;281 UPDATE Lineas set Id_Nodo2 = 26, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.6592455 where Id_Nodo1=27;282 UPDATE Lineas set Id_Nodo2 = 9, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 3.3124925 where Id_Nodo1=28;283 UPDATE Lineas set Id_Nodo2 = 28, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.5845575 where Id_Nodo1=29;284 UPDATE Lineas set Id_Nodo2 = 11, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 6.82142765 where Id_Nodo1=30;285 UPDATE Lineas set Id_Nodo2 = 30, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 1.20378135 where Id_Nodo1=31;286 UPDATE Lineas set Id_Nodo2 = 13, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 3.3978495 where Id_Nodo1=32;287 UPDATE Lineas set Id_Nodo2 = 32, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.5996205 where Id_Nodo1=33;288 UPDATE Lineas set Id_Nodo2 = 15, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 4.8514005 where Id_Nodo1=34;289 UPDATE Lineas set Id_Nodo2 = 34, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.8561295 where Id_Nodo1=35;290 UPDATE Lineas set Id_Nodo2 = 17, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 2.73785 where Id_Nodo1=36;291 UPDATE Lineas set Id_Nodo2 = 36, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 0.48315 where Id_Nodo1=37;292 UPDATE Lineas set Id_Nodo2 = 37, R0 =2.0795, R1 =1.9018, X0 =2.0182,X1 =0.586, DISTANCIA = 5.95 where Id_Nodo1=38;293 UPDATE Lineas set Id_Nodo2 = 38, R0 =2.0795, R1 =1.9018, X0 =1.8526,X1 =0.66883, DISTANCIA = 1.05 where Id_Nodo1=39;294 UPDATE Lineas set Id_Nodo2 = 19, R0 =1.228, R1 =1.0503, X0 =1.9451,X1 =0.51284, DISTANCIA = 6.33333585 where Id_Nodo1=40;295 UPDATE Lineas set Id_Nodo2 = 40, R0 =1.228, R1 =1.0503, X0 =1.7794,X1 =0.59568, DISTANCIA = 1.1176515 where Id_Nodo1=41;296 297 UPDATE Cargas set P=16588, Q=4838 where Id_Nodo=3;298 UPDATE Cargas set P=7334, Q=2139 where Id_Nodo=5;299 UPDATE Cargas set P=16064, Q=4685 where Id_Nodo=7;300 UPDATE Cargas set P=5122, Q=1494 where Id_Nodo=9;301 UPDATE Cargas set P=10244, Q=2988 where Id_Nodo=11;302 UPDATE Cargas set P=10244, Q=2988 where Id_Nodo=13;303 UPDATE Cargas set P=28636, Q=8352 where Id_Nodo=15;304 UPDATE Cargas set P=9429, Q=275 where Id_Nodo=17;305 UPDATE Cargas set P=10127, Q=2954 where Id_Nodo=19;306 UPDATE Cargas set P=6984, Q=2037 where Id_Nodo=21;307 UPDATE Cargas set P=6984, Q=2037 where Id_Nodo=23;308 UPDATE Cargas set P=7334, Q=2139 where Id_Nodo=25;309 UPDATE Cargas set P=16064, Q=4685 where Id_Nodo=27;310 UPDATE Cargas set P=5122, Q=1494 where Id_Nodo=29;311 UPDATE Cargas set P=10244, Q=2988 where Id_Nodo=31;312 UPDATE Cargas set P=10244, Q=2988 where Id_Nodo=33;313 UPDATE Cargas set P=28636, Q=8352 where Id_Nodo=35;314 UPDATE Cargas set P=9429, Q=275 where Id_Nodo=39;315 UPDATE Cargas set P=6984, Q=2037 where Id_Nodo=41;316 317 318 '''319 self.ejecutar_script(sql)320 321 def autollenadoNueva(self):322 sql='''323 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B2', 1);324 325 326 UPDATE Lineas set Id_Nodo2 = 1, R0 =0.0, R1 =0.0, X0 =0.0,X1 =0.0, DISTANCIA = 5.0 where Id_Nodo1=2;327 328 UPDATE Cargas set P='0.0', Q='0.0' where Id_Nodo=2; 329 330 '''331 self.ejecutar_script(sql)332 333 def autollenadoPrueba(self):334 sql='''335 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B2', 1);336 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B3', 1);337 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B4', 1);338 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B5', 0);339 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B6', 0);340 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B7', 1);341 342 UPDATE Lineas set Id_Nodo2 = 1, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 30 where Id_Nodo1=2;343 UPDATE Lineas set Id_Nodo2 = 2, R0 =0.7728, R1 =0.01273, X0 =3.1112323,X1 =0.35199, DISTANCIA = 15 where Id_Nodo1=3;344 UPDATE Lineas set Id_Nodo2 = 3, R0 =0.7728, R1 =0.02546, X0 =3.1112323,X1 =0.70399, DISTANCIA = 10 where Id_Nodo1=4;345 UPDATE Lineas set Id_Nodo2 = 2, R0 =0.3864, R1 =0.02546, X0 =1.55561,X1 =0.70399, DISTANCIA = 40 where Id_Nodo1=5;346 UPDATE Lineas set Id_Nodo2 = 3, R0 =0.7728, R1 =0.01273, X0 =1.55561,X1 =0.70399, DISTANCIA = 20 where Id_Nodo1=6;347 UPDATE Lineas set Id_Nodo2 = 4, R0 =0.3864, R1 =0.02546, X0 =3.1112323,X1 =0.35199, DISTANCIA = 19 where Id_Nodo1=7;348 349 350 UPDATE Cargas set Alias='C2', P=8000, Q=100 where Id_Nodo=2;351 UPDATE Cargas set Alias='C3', P=12000.0, Q=200 where Id_Nodo=3;352 UPDATE Cargas set Alias='C4', P=8000, Q=200 where Id_Nodo=4;353 UPDATE Cargas set Alias='C5', P=8000, Q=150.0 where Id_Nodo=5;354 UPDATE Cargas set Alias='C6', P=12000.0, Q=100 where Id_Nodo=6;355 UPDATE Cargas set Alias='C7', P=16000, Q=200 where Id_Nodo=7;356 357 INSERT INTO Indicadores (NOMBRE,Id_Nodo1,Id_Nodo2, Distancia) VALUES ('I1', 2,3,1);358 INSERT INTO Indicadores (NOMBRE,Id_Nodo1,Id_Nodo2, Distancia) VALUES ('I2', 2,5,2);359 INSERT INTO Indicadores (NOMBRE,Id_Nodo1,Id_Nodo2, Distancia) VALUES ('I3', 3,6,3);360 INSERT INTO Indicadores (NOMBRE,Id_Nodo1,Id_Nodo2, Distancia) VALUES ('I4', 4,7,2);361 362 363 '''364 self.ejecutar_script(sql)365 366 def autollenadoPruebaSinIdentificadores(self):367 sql='''368 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B2', 1);369 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B3', 1);370 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B4', 1);371 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B5', 0);372 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B6', 0);373 INSERT INTO Nodos (Nombre, Troncal) VALUES ('B7', 1);374 375 UPDATE Lineas set Id_Nodo2 = 1, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 30 where Id_Nodo1=2;376 UPDATE Lineas set Id_Nodo2 = 2, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 15 where Id_Nodo1=3;377 UPDATE Lineas set Id_Nodo2 = 3, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 10 where Id_Nodo1=4;378 UPDATE Lineas set Id_Nodo2 = 2, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 8 where Id_Nodo1=5;379 UPDATE Lineas set Id_Nodo2 = 3, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 20 where Id_Nodo1=6;380 UPDATE Lineas set Id_Nodo2 = 4, R0 =0.3864, R1 =0.01273, X0 =1.55561,X1 =0.35199, DISTANCIA = 19 where Id_Nodo1=7;381 382 383 UPDATE Cargas set Alias='C2', P=8000, Q=100 where Id_Nodo=2;384 UPDATE Cargas set Alias='C3', P=8000, Q=100 where Id_Nodo=3;385 UPDATE Cargas set Alias='C4', P=8000, Q=100 where Id_Nodo=4;386 UPDATE Cargas set Alias='C5', P=8000, Q=100 where Id_Nodo=5;387 UPDATE Cargas set Alias='C6', P=8000, Q=100 where Id_Nodo=6;388 UPDATE Cargas set Alias='C7', P=8000, Q=100 where Id_Nodo=7;389 390 '''...

Full Screen

Full Screen

modelo.py

Source:modelo.py Github

copy

Full Screen

...66 cursor.execute(sql, (id,))67 self.conexion.commit()68 cursor.close()69 70 def ejecutar_script(self,sql):71 """ Ejecuta varias sentencia SQL, sin retornar algun valor"""72 cursor = self.conexion.cursor()73 cursor.executescript(sql)74 self.conexion.commit()75 #cursor.Close()76 cursor.Close77 78 def crearTabla(self):79 """ crea la tabla de la base de datos y los valores 80 por omision si aquella no existe aun """81 sql = '''82 CREATE TABLE productos(83 id INTEGER PRIMARY KEY AUTOINCREMENT,84 codigo VARCHAR(8),85 descripcion VARCHAR(100),86 valor REAL(5, 2)87 );88 89 INSERT INTO productos (codigo, descripcion, valor)90 VALUES ('CDF45', 'Codificador de senales analogicas', '1450,00');91 92 INSERT INTO productos (codigo, descripcion, valor)93 VALUES ('MLD12', 'Molde para cubierta de lampara', '12,00' );94 95 INSERT INTO productos (codigo, descripcion, valor)96 VALUES ('TLV36', 'Televisor Hankey 36 pulgadas', '2450,25' );97 98 INSERT INTO productos (codigo, descripcion, valor)99 VALUES ('CMP09', 'Comprobador de continuidad LJK', '547,80' );100 101 INSERT INTO productos (codigo, descripcion, valor)102 VALUES ('TRJS015', 'Terraja SIM 15', '45,25');103 '''...

Full Screen

Full Screen

sqlite.py

Source:sqlite.py Github

copy

Full Screen

...62 if commit:63 conexion.commit()64 cursor.close()65 return resultado66def ejecutar_script(ruta_script: str, commit: bool = False, conexion: sqlite3.Connection = None) -> List[any]:67 """68 Ejecuta un script ubicado en la ruta enviada por parametro.69 En caso de hacer inserts o updates asegurarse de pasar commit=True70 """71 if conexion is None:72 conexion = obtener_conexion(config.RUTA_DB_PREDEFINIDA)73 with open(ruta_script, mode='r') as script_archivo:74 contenido_script = script_archivo.read()75 cursor = conexion.cursor()76 cursor.executescript(contenido_script)77 resultado = cursor.fetchall()78 if commit:79 conexion.commit()80 cursor.close()...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run SeleniumBase automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful