Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I use Selenium RC for testing. Now to perform a load test, I want to run parallel test cases. Is there any way to run them without opening a browser?

1 Answer

0 votes
by (62.9k points)

It is quite easy to hide the browser without XVFB. Just install PhantomJS. Then, change this line:

driver = webdriver.Firefox()

to:

driver = webdriver.PhantomJS()

The rest of your code won't need to be changed and no browser will open. For debugging purposes, use driver.save_screenshot('screen.png') at different steps of your code.

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s Selenium certification!

Browse Categories

...