Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Message with Chrome Webdriver via Selenium: "Allowing web_page contexts requires supplying a value for matches"

I'm running a compiled Python script that employs Selenium to start a Chrome Webdriver session that visits a site and carries out a few tasks. The script behaves as I would expect it to, except that it prints an "error" message to console when I first start the webdriver. The error reads:

[2460:7268:1121/133303:ERROR:base_feature_provider.cc(122)] manifestTypes: Allowing web_page contexts requires supplying a value for matches.

Does anyone know what this means? Like I said above, the script appears to behave as I expect it to, which makes me wonder what this message is attempting to indicate. Googling the phrase brings up a slew of code.google pages that mention but do not clearly describe the same error. I can post the code, but it's excessively long (2000+ lines) and I'm not sure which lines are pertinent to the problem, because I can't understand the error message. I normally use the Firefox browser with Selenium, but am exploring Chrome as an alternative. In any event, I would be most thankful if someone could help me understand this error message.

like image 714
duhaime Avatar asked Nov 21 '13 18:11

duhaime


1 Answers

You can ignore that message, as it is part of ChromeDriver's logging. If you want to surpress those messages, you can start ChromeDriver with the -silent flag.

This should do the trick

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("-silent")
driver = webdriver.Chrome(chrome_options=chrome_options)
like image 165
Nathan Dace Avatar answered Oct 21 '22 16:10

Nathan Dace