I just added ExceptionHub (a javascript error tracking service) to our website, but all my selenium tests are failing now. When I look at the selenium output, it says it timed out in waitForPageToLoad command. If I run the test locally, I see that the page loads up fine, so I'm not really sure why selenium keeps waiting. Has anyone else managed to get ExceptionHub working with selenium?
I've seen similar problems with UserVoice. Often the rest of the page is loaded but still waiting for UserVoice and the test will time out.
It might help if you don't start loading ExceptionHub until the rest of the page is loaded. Of course that would mean you can't catch any javascript errors during page load...
Related
I want to write a script to scrap some data from aliexpress, so I need to be logged in first, When I try to login, Aliexpress ask for slide to verify sometimes, I made an script to do this in an automated way using selenium actions, but it gives the following error:
Screenshot of error
Well, I tried to it manually, But I am getting the same error, so it seems somehow aliexpress is detecting that its running in an automated environment, so please can you help me to avoid that.
Resources I used:
I used chrome_driver with brave browser and chrome but both didn't work.
I'm trying to scrape my own banking information by automating the process using Selenium in Ruby.
I'm running into a bizarre situation where performing the exact same sequence in the browser (whether just the normal browser or private/incognito) works fine, but when I try to log in under a Selenium-controlled browser I get back a strange 500 error from the server.
I've noticed the browser console logs also look different in terms of certain logging messages related to cookies, JS errors, libraries being loaded, etc.
I have found an answer on SO mentioning one possible difference in Chrome being a specific "cdc" string that might be detectable, but is there some kind of corresponding difference in Firefox/Geckodriver that could be used to detect the fact that I'm trying to automate the browser?
I'm not really sure where to look, because my understand was that running via Selenium should basically have identical behaviour to running via the browser itself.
Would love some guidance on what mechanisms may be in play to explain the difference in behaviour!
I have a set of Testcafe tests for our application, which since recently fails to run in some of our environments. The test only opens the browser, loads the start page specified in the fixture (or navigated to in within the test) and then only appears to continuously reload the page without proceeding with the test. This happening across all browsers (Chrome, Firefox, Edge) and different versions of NodeJs and Testcafe on Windows 10.
After enabling debug logging I found this message repeatedly in the log:
{
cmd: 'wait-for-file-download',
sessionId: '0X_DqYtz0'
}
The browser console also showed two page resources/scripts that failed to load with net::ERR_FAILED errors due to violating the Content Security Policy, so I assume that these might cause the problems. However it does not seem to have any impact on manual page interaction or automated test using other frameworks like PyTest.
While we are investigating on the conflicting resources, is there anything I can do in Testcafe to bypass the issue and allow the tests to run? Or alternatively is there a way to fail a Testcafe test when encountering this issue instead of reloading and possibly eventually timing out?
We've started getting random timeouts, but can not get reasons of that. The tests run on remote machines on amazon using selenium grid. Here is how it is going on:
browser is opened,
then a page is loading, but can not load fully within 120 seconds,
then timeout exeption is thrown.
If I run the same tests localy then everything is ok.
The Error is ordinary timeout exception that is thrown if a page is not loaded completely during the period of time that is set in driver.manage().timeouts().pageLoadTimeout(). The problem is that a page of the site can not be loaded completely within that time. But, When period of time that is set in driver.manage().timeouts().pageLoadTimeout() is finished and, consequently, Selenium possession of a browser is finished, the page is loaded at once. The issue can not be reproduced manually on the same remote machines. We've tried different versions of Selenium standalone, Chromedriver, Selenium driver. Browser is Google Chrome 63. Would be happy to hear any suggestions about reasons.
When Selenium loads a webpage/url by default it follows a default configuration of pageLoadStrategy set to normal. To make Selenium not to wait for full page load we can configure the pageLoadStrategy. pageLoadStrategy supports 3 different values as follows:
normal (full page load)
eager (interactive)
none
Code Sample :
Java
capabilities.setCapability("pageLoadStrategy", "none");
Python
caps["pageLoadStrategy"] = "none"
Here you can find the detailed discussions through Java and Python clients.
I am doing automation testing of a web application using selenium. While running automation testing of web application you encounter application errors. Is there any way to detect those exceptions. Specially exceptions that are on the page which causes the page to hang up as it is not finding the element it is looking for or page stays on the same page and waitforpage() function keeps running. How can I solve it. Please help
You'll need to put in screen-scraping code, where you search the page for various messages.