J'utilise la version 81.0.4044.113 (version officielle) (64 bits). Cela ne se produisait pas auparavant et le code fonctionnait parfaitement. Mais après quelques jours, je l'ai relancé et cette erreur est survenue.
J'utilise ces modules->
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import csv
import time
from tkinter import *
def Authorization():
time.sleep(15)
username = driver.find_element_by_id("userInput")
username.send_keys('username')
driver.find_element_by_xpath("//*[@id='login-button']").click()
time.sleep(5)
password = driver.find_element_by_xpath("//*[@id='passwordInput']")
password.send_keys('password')
submit_button = driver.find_element_by_xpath("//*[@id='login-button']").click()
def Extractor():
time.sleep(25)
integrated_release = driver.find_elements_by_xpath("//*[@id='versionArea']/div/table/tbody/tr[2]/td[2]")
global integrated_release_data
integrated_release_data = [x.text for x in integrated_release]
impact_release = driver.find_elements_by_xpath("//*[@id='versionArea']/div/table/tbody/tr[5]/td[2]")
global impact_release_data
impact_release_data = [x.text for x in impact_release]
build_platform = driver.find_elements_by_xpath("//*[@id='btkArea']/div/table/tbody/tr[2]/td[2]/span")
global build_platform_data
build_platform_data = [x.text for x in build_platform]
def To_csv():
csvData = [final_data]
with open('data.csv', 'a') as csvFile:
writers = csv.writer(csvFile)
writers.writerows(csvData)
csvFile.close()
def printtext():
global bugName
bugName = e.get()
print(bugName)
def kinter():
root = Tk()
root.geometry("500x100")
root.title('xtractor')
var = StringVar()
label = Label( root, textvariable=var)
var.set("Enter")
label.pack()
global e
e = Entry(root)
e.pack()
e.focus_set()
b = Button(root,text='submit',command=printtext)
b.pack(side='bottom')
root.mainloop()
kinter()
driver = webdriver.Chrome()
bugs = bugName.split(',')
driver.get("http........"+bugs[0])
bugname = [bugs[0]]
Authorization()
Extractor()
final_data = a+b+c+d+e
To_csv()
count = 0
for bug in bugs:
try:
if count == 0:
count += 1
continue
driver.get("http:....."+bug)
bugname = [bug]
Extractor()
final_data = a+b+c+d+e
To_csv()
except:
continue
et j'ai installé la même version de webdriver que de chrome. Une idée comment puis-je résoudre ce problème?