1

we are testing our projects with selenium. Using chrome browser with chromedriver (v2.9.248315).

Now we are setting up a CI infrastructure and we want to run our selenium tests automated. We are using several Windows 2012 R2 64 bit servers for our CI. We have one main Jenkins server and several slave-nodes.

The problem is our selenium Test dont run like the do local on our developer computer. Our jenkins/maven log shows the following error:

11:56:39 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.332 sec <<< FAILURE!
11:56:39 org.my.test.Class Time elapsed: 10.331 sec  <<< ERROR!

followed by:

11:56:39 Driver info: org.openqa.selenium.chrome.ChromeDriver
11:56:39 Capabilities [{applicationCacheEnabled=false, rotatable=false, chrome={userDataDir=C:\Windows\TEMP\scoped_dir2012_22747}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, version=50.0.2661.94, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
11:56:39 Session ID: 894ddcdc22ae6ee13731d8a9ceb13fb0
11:56:39 at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)

11:56:39 Caused by: org.openqa.selenium.NoSuchElementException: no such element
11:56:39   (Session info: chrome=50.0.2661.94)
11:56:39   (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.3 x86_64) (WARNING: The server did not provide any stacktrace information)
11:56:39 Command duration or timeout: 11 milliseconds

When i run the maven test on the server through console i can see that the crome browser is starting but not responding. It seems that the selenium test classes do not recive any response from the webdriver.

Update: We tried to use Firefox instead of chrome browser where we do not need the chromedriver, but still same issue:

13:16:48 Driver info: org.openqa.selenium.firefox.FirefoxDriver
13:16:48 Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=46.0.1, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
13:16:48 Session ID: 3f8319f8-ff6d-42f1-9bf6-b955bfbc51b4
13:16:48 at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)

Update: We are running the test through maven.. When i start them manually the chrome browser opens but does not seem to respond. We found out that when the tests runs through the slave the browser opens and is navigating to the site (Server log). but it seams that the test does not recive any result from the browser. So the browser might do as commandet but the Selenium test is not able to recive any response to validate.

Every suggestion is welcome. =)

2
  • How is your selenium environment set up? do all the jenkins nodes (master and slaves) have a fully working selenium setup? Do your tests work when you manually run them on said jenkins nodes through the CLI?
    – Cronax
    May 4, 2016 at 14:31
  • I updated the question... I can clearly see in the wildfly logs that the pages are opened, also the automated login works as expected, but as soon as the test needs some result from the browser like id's it does not recive any response. May 6, 2016 at 5:21

1 Answer 1

1

Problem Solved,

we had to run the java & the jenkins-slave.exe (Service) with a specefied user, not as system User.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.