1

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 .

1
  • In my opinion it is not releted to chrome in any way, In remote firefox You would get same exception. But it is just my guess. Commented May 4, 2016 at 7:13

2 Answers 2

1

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 :

  • Always run window.maximize() before test
  • wait for element to be visible
  • Improve locator, sometimes it might not click on what U think

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

3 Comments

Eelke, thanks for your response . I dint see any thing diff on Remote . It was executing the same way as on my local . If i have to say in terms on code , The strange part is not every time the same test case is failing , one time of test case another time another test case but b/w the 2 errors i mentioned and working fine without any issues on local . My RDP has higher config than my local and is on same network . Is that sth which might be causing the tests to fail ?
Some other thoughts, the difference in screen resolution between your machine and the remote can make a difference unfortunately. Maximizing, as suggested in the other post may not help if the screen resolution is too small and the target element ends up off the screen, and is not handled. Though, as "always maximizing" suggests, the concept is really to make the test repeatable and behave the same each time on each machine.
I am having this exact same issue. Firefox/chrome run fine locally, but invoking the tests on my ec2 instance, they fail at random elements. Adding sleeps and maximizing windows has not worked. How did you solve this? I have searched high and low, and have found no helpful resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.