Failed to load resource: the server responded with a status of 429 (Too Many Requests) and 404 (Not Found) with ChromeDriver Chrome through Selenium

429 Too Many Requests The HTTP 429 Too Many Requests response status code indicates that the user has sent too many requests in a given amount of time (“rate limiting”). The response representations SHOULD include details explaining the condition, and MAY include a Retry-After header indicating how long to wait before making a new request. … Read more

WebDriverException: Service U:/Scraping/chromedriver.exe unexpectedly exited. Status code was: 1 while working with Chrome and Python

Same error here. My issue was that I had chromedriver.exe on a company sharedrive. Some firewall or security setting was presumably preventing python from accessing the executable file in that remote location. I made chromedriver.exe local and it worked.

selenium.common.exceptions.SessionNotCreatedException: Message: session not created from tab crashed using ChromeDriver Chrome Selenium Python

This error message… selenium.common.exceptions.SessionNotCreatedException: Message: session not created from tab crashed (Session info: headless chrome=78.0.3904.108) …implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session. Analysis and Solution There are diverse solution to this issue. However as per UnknownError: session deleted because of page crash from tab crashed this … Read more

Not able to maximize Chrome Window in headless mode

Since you’re running tests in a headless mode, there is no active browser window available. As such your driver.driver.manage().window().maximize() would always fail in such situations because the driver doesn’t know which window to maximize since there aren’t any available. You can either follow what @DebanjanB has mentioned or you can start the headless browser with … Read more

How to solve ‘Getting Default Adapter failed’ error when launching Chrome and try to access a webpage using the ChromeDriver using Selenium

This error message… ERROR:device_event_log_impl.cc(162)] [15:29:54.314] Bluetooth: bluetooth_adapter_winrt.cc:1055 Getting Default Adapter failed. …implies that ScopedClosureRunner on_init failed in BluetoothAdapterWinrt::OnGetDefaultAdapter(). Analysis This error is defined in bluetooth_adapter_winrt.cc as follows: void BluetoothAdapterWinrt::OnGetDefaultAdapter( base::ScopedClosureRunner on_init, ComPtr<IBluetoothAdapter> adapter) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!adapter) { BLUETOOTH_LOG(ERROR) << “Getting Default Adapter failed.”; return; } Solution Ensure that: Selenium is upgraded to current levels … Read more

Does Chrome use XPath 2.0?

No, Chrome uses XPath 1.0. You can simplify your XPath expression to just a v2.0 function to see this: $x(“lower-case(‘ABC’)”) SyntaxError: Failed to execute ‘evaluate’ on ‘Document’: The string ‘lower-case(‘ABC’)’ is not a valid XPath expression. Trying any other XPath 2.0 function such as current-date() will yield a similar error. There is no built-in way … Read more

Python selenium: DevTools listening on ws://127.0.0.1

I had the same issue, did a bit of digging and finally found a working solution. This should remove the DevTools message popping up: options = webdriver.ChromeOptions() options.add_experimental_option(‘excludeSwitches’, [‘enable-logging’]) driver = webdriver.Chrome(executable_path=”<path-to-chrome>”, options=options) As per the solution from this chromium issue.

ERROR:ssl_client_socket_openssl.cc(1158)] handshake failed with ChromeDriver Chrome browser and Selenium

You get this error when the browser asks you to accept the certificate from a website. You can set to ignore these errors by default in order avoid these errors. For Chrome, you need to add –ignore-certificate-errors and –ignore-ssl-errors ChromeOptions() argument: options = webdriver.ChromeOptions() options.add_argument(‘–ignore-certificate-errors’) options.add_argument(‘–ignore-ssl-errors’) driver = webdriver.Chrome(chrome_options=options) For the Firefox, you need to … Read more

WebDriverException: unknown error: Runtime.executionContextCreated has invalid ‘context’: while initializing Chrome browser

This error message… org.openqa.selenium.WebDriverException: unknown error: Runtime.executionContextCreated has invalid ‘context’: {“auxData”:{“frameId”:”11895A1B77AC560388AA2919259E1422″,”isDefault”:true},”id”:1,”name”:””,”origin”:”://”} …implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session. Your main issue is the version compatibility between the binaries you are using as follows : You are using chromedriver=2.8 which is pretty ancient. You are using chrome=66.0 Release … Read more