4

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.

2
  • 1
    Please post code and errors as plain text. Image links just make it harder for people to help you. Commented Oct 4, 2021 at 20:02
  • im sorry eddited Commented Oct 4, 2021 at 20:05

5 Answers 5

13

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)
Sign up to request clarification or add additional context in comments.

3 Comments

how to do same on JavaScript?
Where are you adding the path to the webdriver. E.g. PATH= "C:/browserDrivers/chromeDriver.exe" I use this and pass in the path as well. Don't you need that?
@Dale You don't need to mention the path in your python code if you keep chromedriver.exe into C:\Windows\System32.
4

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()

Comments

1

Exactly" for Python

options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
browser = webdriver.Chrome(options=options)

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
1

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)

Comments

1

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()

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.