1

When I run my test on local machine all works fine. But when I move to Jenkins I get error org.openqa.selenium.NoSuchSessionException: no such session I do not get what can be wrong? I tested before simple test without Selenium and it works fine. In Jenkins I have linked my repo and run my test with gradle test.

dsuess
  • 5,219
  • 2
  • 22
  • 22
slovvic
  • 417
  • 3
  • 6
  • 14
  • Does your jenkins server have a browser on it? For the selenium tests to run, they will need some sort of browser - headless or real. – Ashley Frieze Nov 22 '16 at 09:32
  • I have in my resources chromedriver.exe – slovvic Nov 22 '16 at 09:36
  • And Jenkins is running on a Windows box with Chrome installed? – Ashley Frieze Nov 22 '16 at 09:40
  • Which browser are you using to start your tests? Firefox has changed and need `geckodriver` for latest versions, what may lead for this kind of problem when running remotely. An option is also to set a docker image for Selenium Grid and Selenium Nodes to be used in a CI server. If you want to see, check their [Github Page](https://github.com/SeleniumHQ/docker-selenium). – Tom Nov 22 '16 at 09:48
  • @AshleyFrieze You where right I just need to install Chrome and now it works. But I have one more question. Is there a way to see those test running? Physically? – slovvic Nov 22 '16 at 10:06

1 Answers1

0

Summary:

First answer is given by @ashley-frieze: You need to have Chrome Browser installed to to run test against it.

Second issue: To see the browser running, maybe take a look at Jenkins : Selenium GUI tests are not visible on Windows , where it is suggested to allow the service to "interact with desktop". Maybe that helps.

Community
  • 1
  • 1
dsuess
  • 5,219
  • 2
  • 22
  • 22