Reputation: 545
Every time when i fire my selenium test cases, few (5-6) test cases are failing when running on a remote desktop . But when i run on my local they are absolutely working fine . Both my local and RDP has same chrome driver version , same OS(win7) and same browser version . I see below two kinds of errors in the strace.
1.unknown error: Element is not clickable at point (611, 449). Other element would receive the click 2.stale element reference: element is not attached to the page document
I am using the remote wedriver new RemoteWebDriver(new URL(driverUrl), browser.getCapabilities());
I have no idea why some of them are failing just only on RDP . Any help would be greatly appreciated .
Upvotes: 1
Views: 2833
Reputation: 2709
There are usually issues in scripts.
Things you could do to fix 1)unknown error: Element is not clickable at point (611, 449). Other element would receive the click
:
Thing s to fix 2.stale element reference: element is not attached to the page document
:
No use List of web elements, locate element every time U use it and this issue will be fixed usually.
Upvotes: 1
Reputation: 21
When the driver runs the test on the remote, I've seen where it does not launch into my web application the same as on my desktop due to how the browser is set to come up the first time. To the browser, when it is launched by the driver, it can look like a new user. You might see this if you can observe your remote machine when the test is running on it. This was killing me in particular with Firefox, where I had to get into the config files under the hood to kill the first run behaviors. You can also try screen capture if for some reason it is not convenient to observe the test running on the target remote machine.
Other thoughts...
In the code checking for the element, sometimes timing is an issue, try a sleep and retry checking for element. Timing might be an issue if the target is physically somewhere else with a slower network.
Upvotes: 0