Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Headless Chrome keep popping deprecation

Tags:

I am using a selenium headless Chrome on python to scrape a website. This website uses synchronous XMLHttpRequest, which is probably worse than asynchronous, but I don't really care (not my website). Each time my selenium webdriver visits this website, the Chrome deprecation message will be printed in my console:

"Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/."

How to stop this message from popping up?

like image 521
Myusico Avatar asked May 10 '18 18:05

Myusico


1 Answers

This may have already been solved, but as this thread (link here) explains, adding a new argument will help.

options.add_argument("--log-level=3")
like image 114
leopon Avatar answered Sep 28 '22 19:09

leopon