Running Selenium IDE Test Files in Headless Environment

I need help with executing test scripts created in Selenium IDE using a headless browser setup.

I’ve been working with the Selenium IDE Firefox extension to build my test cases, and it exports everything as HTML files. The problem I’m facing is getting these HTML test files to work with headless browsers like PhantomJS.

I can successfully run the tests from command line using regular browsers, but when I try to use a headless solution, it doesn’t work. Here’s what I’m currently using:

java -jar selenium-server-standalone-2.39.0.jar -htmlSuite "*firefox" "http://localhost" "test-suite/MainSuite.html" "test-results.html"

I know the IDE can convert tests to other programming languages, but I need to keep using the Firefox plugin since non-technical team members create the tests. They aren’t comfortable with coding but can handle the point-and-click interface.

Has anyone found a way to make Selenium IDE HTML files work with headless browsers? I’ve seen suggestions about running Firefox in virtual displays, but that’s not truly headless like PhantomJS.

We encountered a similar issue, and using Docker containers proved to be the solution about six months ago. We packaged Firefox with Xvfb in a container and executed our HTML suites that way. The key is to configure the selenium-server command to run within the container while keeping the test files on the host machine.

I created a simple wrapper script that initiates the containerized Firefox, runs your Java command against it, and then cleans up afterward. Your non-technical team can continue using the IDE as before, but the execution now happens in a true headless environment.

The JavaScript rendering performance is significantly better than what we experienced with PhantomJS, and we haven’t faced those annoying timeout issues that frequently plagued our PhantomJS setup. Additionally, you can version control the entire browser environment, ensuring reproducibility of test runs across different machines.

Hit this same problem two years back. Our QA team wanted the IDE interface, but we needed headless execution for builds. We ditched PhantomJS and went with Selenium Grid + headless Chrome instead. Way more reliable.

You can keep your HTML suite - just modify the command to target a remote webdriver running Chrome with the --headless flag. Set up a hub/node config where the node runs headless Chrome. Your existing test structure stays intact, but now you get proper headless execution.

Chrome’s headless mode crushed PhantomJS for us, especially on JavaScript-heavy pages. Takes some upfront config work, but once it’s running, it plays nice with most CI systems.

yeah, phantomjs is not great for that. try using xvfb instead, it’s really good for running firefox headless in ci setups. look at the docs for more config options, but this should help ya out.