Headless Selenium with Xvfb - JavaScript not working, but no <noscript>
I'm using Selenium on a开发者_如何转开发 Headless Linux machine with Xvfb and Firefox and got a little strange behaviour:
I have a button, which opens a inline popup with javascript and does a postback and load the content in the page if no javascript is enabled. I also have a -tag in my page to show the visitor that they should enable JS.
When I now run a test with selenium to check if the popup is openend the test fails and on the screenshot which is taken on failure I see the static page which should apear when JS is disabled BUT the noscript-Tag is not visible --> what going on here, because I can't even reproduce this "outside of selenium" because either the popup opens or the noscript-Tag is visible?
Found the problem and it wasn't selenium: The folder my scripts are loaded from had the wrong permissions on the test system, so the javascripts werent loaded at all with a 403 error...
精彩评论