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:
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 :)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.