Error using Selenium Chrome Webdriver with python
Question:
hi im using chrome driver but i cant fix this error
mycode:
options = Options()
options.add_argument('--disable-gpu')
options.add_argument('--disable-dev-shm-usage')
self.site = webdriver.Chrome(executable_path="C:chromedriver.exe",chrome_options=options)
self.site.get("https://sgite.com/en/site/")
error:
[23468:14696:1004/232130.459:ERROR:chrome_browser_main_extra_parts_metrics.cc(228)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[23468:14696:1004/232130.468:ERROR:chrome_browser_main_extra_parts_metrics.cc(231)] crbug.com/1216328: Checking Bluetooth availability ended.
[23468:14696:1004/232130.514:ERROR:chrome_browser_main_extra_parts_metrics.cc(234)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[23468:14696:1004/232130.588:ERROR:chrome_browser_main_extra_parts_metrics.cc(238)] crbug.com/1216328: Checking default browser status ended.
Answers:
If you are using Selenium with Python then add these extra options into your Selenium code-
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
This same thing worked for me like the answer above me.
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
driver.get('https://something.com/login')
driver.maximize_window()
Exactly" for Python
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
browser = webdriver.Chrome(options=options)
The below code is tested and works like a charm.
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
For the Javascript users, the solution is:
const { Builder } = require('selenium-webdriver')
const chrome = require('selenium-webdriver/chrome')
const options = new chrome.Options()
options.excludeSwitches(['enable-logging'])
const driver = new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build()
hi im using chrome driver but i cant fix this error
mycode:
options = Options()
options.add_argument('--disable-gpu')
options.add_argument('--disable-dev-shm-usage')
self.site = webdriver.Chrome(executable_path="C:chromedriver.exe",chrome_options=options)
self.site.get("https://sgite.com/en/site/")
error:
[23468:14696:1004/232130.459:ERROR:chrome_browser_main_extra_parts_metrics.cc(228)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[23468:14696:1004/232130.468:ERROR:chrome_browser_main_extra_parts_metrics.cc(231)] crbug.com/1216328: Checking Bluetooth availability ended.
[23468:14696:1004/232130.514:ERROR:chrome_browser_main_extra_parts_metrics.cc(234)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[23468:14696:1004/232130.588:ERROR:chrome_browser_main_extra_parts_metrics.cc(238)] crbug.com/1216328: Checking default browser status ended.
If you are using Selenium with Python then add these extra options into your Selenium code-
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
This same thing worked for me like the answer above me.
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
driver.get('https://something.com/login')
driver.maximize_window()
Exactly" for Python
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
browser = webdriver.Chrome(options=options)
The below code is tested and works like a charm.
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(options=options)
For the Javascript users, the solution is:
const { Builder } = require('selenium-webdriver')
const chrome = require('selenium-webdriver/chrome')
const options = new chrome.Options()
options.excludeSwitches(['enable-logging'])
const driver = new Builder()
.forBrowser('chrome')
.setChromeOptions(options)
.build()