I am using Version 81.0.4044.113 (Official Build) (64-bit). It was not happening before and the code was working completely fine. But after few days I ran it again and this error came.
I am using these 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
and I have installed the same version of webdriver as of chrome. Any idea how can I solve this issue?
This error message...
ERROR:browser_switcher_service.cc(238)] XXX Init()
...implies that call to on_init_ raised an error.
This error is defined in bluetooth_adapter_winrt.cc and was the direct impact of the changes incorporated within google-chrome as per the details available within the discussion Chrome no longer accepts certificates that fallback to common name
Ensure that:
However it was observed that this error can be supressed by running Chrome as root user (administrator) on Linux. but that would be a deviation from the documentation in ChromeDriver - WebDriver for Chrome where it is mentioned:
A common cause for Chrome to crash during startup is running Chrome as root user (administrator) on Linux. While it is possible to work around this issue by passing '--no-sandbox' flag when creating your WebDriver session, i.e. the ChromeDriver session as such a configuration is unsupported and highly discouraged.
Ideally, you need to configure your environment to run Chrome as a regular user instead.
Finally, as per the documentation in Selenium Chrome Driver: Resolve Error Messages Regarding Registry Keys and Experimental Options these error logs can be supressed by adding the argument:
excludeSwitches: ['enable-logging']
So your effective code block will be:
from selenium import webdriver
options = webdriver.ChromeOptions() 
options.add_experimental_option("excludeSwitches", ["enable-logging"])
driver = webdriver.Chrome(options=options, executable_path=r'C:\WebDrivers\chromedriver.exe')
driver.get("https://www.google.com/")
I use Version 81.0.4044.113 (Official Build) (64-bit),too. and the same happens i encounter but it still run successfully. and now i still find to solve this problem!
I had the same problem i tried alot but could not find the answer i needed the best thing i came up with to solve the error is to change your webdriver to geckodriver and use firefox instead of chrome
i hope this helped
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With