Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
How to run webdriver tests on docker firefox-standalone-debug container instead of regular firefox browser

I have a regular Firefox installed on my Linux Ubuntu as well as docker-firefox-standalone-debug container. Moreover I have Xfvb and I set DISPLAY overthere. Now when I run my Webdriver test from Jenkins everything works fine and my test runs on regular Firefox. But the problem is that I would like to start my test now on docker-firefox-standalone-debug container. Can anyone tell me how to force my test on Jenkins to run on docker? By default it starts on regular Firefox and I don't now how to tell him yo run on docker-firefox-debug?

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

You'll need to use the remote web driver instead of the regular WebDriver.

For example if you run your conatiner as follows:

docker run -d -p 4444:4444 selenium/standalone-firefox-debug

Use the follwing code:

RemoteWebDriver driver = new RemoteWebDriver(
                    new URL("http://localhost:4444/wd/hub"),
                    DesiredCapabilities.firefox());

Instead of:

WebDriver driver = new FirefoxDriver();

Regards

about 4 years ago · Santiago Trujillo Report

0

I run:

docker run -d -p 32780:4444 -p 5999:5900 selenium/standalone-firefox-debug

so when I type

docker ps

I have

6b7fa91575ae selenium/standalone-firefox-debug "/opt/bin/entry_point" 8 seconds ago Up 6 seconds 0.0.0.0:32780->4444/tcp, 0.0.0.0:5999->5900/tcp

then in my code:

RemoteWebDriver driver = new RemoteWebDriver( 
                                new URL("http://192.168.99.100:32780/wd/hub"), 
                                DesiredCapabilities.firefox());

This works :)

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!