Reputation: 385
I am running Selenium headless browser on a Jenkins windows node as a part of test suite. However, it throws org.openqa.selenium.ElementNotVisibleException - element is not visible.
On my local machine, I am able to run the same test suite successfully. The only difference is that I use chrome browser instead of a headless browser.
Can someone help me with this one?
Note:
Upvotes: 4
Views: 821
Reputation: 26
I had the same problem. With me it was the headless screen size. Our Jenkins maintainer group in the company set the default screen size to 640:480 so my page didn't render the way it should. I use Xvfb for setting the screen in Jenkins, using this extra cmd/shell command:
export DISPLAY=:1
Xvfb :1 -screen 0 1920x1080x16 &
I hope this helps :)
Upvotes: 1