SushilG
SushilG

Reputation: 731

How to implement selenium to run in headless mode in linux cloud

When I use WebDriver driver = new HtmlUnitDriver(); to run selenium test cases in headless mode on Windows machine then it works fine. But it doesn't work on Linux cloud. Do I need xvfb frame buffer, sample code and steps to implement this will be really helpful.

Upvotes: 0

Views: 290

Answers (1)

Rajnish kumar
Rajnish kumar

Reputation: 11

first install xvfb with below command

apt-get install xvfb firefox

Now run your test file using xvfb as

xvfb-run ruby test.rb

Upvotes: 1

Related Questions