1

This is a very strange issue I am facing. I have my selenium scripts which work completely fine on my locally system when executed. Also I am using selenium grid for remote execution. When I try to run the same on my Jenkins which is installed on a VM my test fails. I have set my implicit timeout to 20 secs and page load timeout to 100 secs. Still I have the issue.

My Error logs on Jenkins for one of my failed test is:

Element not found exception.

Jatin
  • 660
  • 3
  • 8
  • 28
  • 1) It’s possible that the app/page being tested loads a lot of JavaScript. Does your local browser always use the same profile or has static files already in cache? That might explain why local page loads are faster than when accessed from the Jenkins slave. – Timir May 29 '18 at 10:46
  • 2) Is there a difference in network latency between the client and the system under test in each case? – Timir May 29 '18 at 10:48
  • Hi timir, I am running on remote chrome browser. Only execution process changes. when I run in eclipse the test pass but when I run through my jenkins it fails. The browser is always the remote – Jatin May 29 '18 at 10:52
  • Are you testing for images, or for some other element exist? – higz555 May 29 '18 at 11:08
  • Yes the test for image. It failed for it and also I get the element not found exceptions – Jatin May 29 '18 at 11:19
  • In that case, consider taking a screenshot upon test failure. – Timir May 29 '18 at 11:34
  • I found the issue my test are executing faster on Jenkins VM. I think I need to add waits for it – Jatin May 29 '18 at 11:47
  • @Jatin Check this discussion https://stackoverflow.com/questions/48471321/nosuchelementexeption-selenium-unable-to-locate-element/48472940#48472940 – undetected Selenium May 29 '18 at 11:54

0 Answers0