0

I have recorded scripts through Selenium IDE and converted them to JUnit 4 Webdriver scripts. Of course converted scripts had to be changed to run smoothly as Junits. Now my next goal is to make these scripts run on CI, So obviously I need some headless browser for this purpose. I found some threads, but I am looking for Junits specifically.

What could be the best solution/approach for this, any help in this regard is appreciated.

2
  • You don't necessarily need a headless browser for CI runs. Why not just stick to a standard basic installation of Firefox or Chrome? Why the 'need' to use a headless browser? Commented Jul 3, 2013 at 15:57
  • Well,my CI is running on EC2 instance, So assume I need to install headless browser ..if not, am I missing something in my understanding? Commented Jul 3, 2013 at 16:05

1 Answer 1

1

Take a look at PhantomJS. It is a headless WebKit-based browser and there is Selenium WebDriver for that called GhostDriver.

That's what i use and is OK but there is also the option of using a headed browser like Firefox or Chrome and then use Xvfb to ignore screen output.

Sign up to request clarification or add additional context in comments.

2 Comments

I am able to do this task using selenium chrome driver on my windows machine and everything works fine, but I want to package this program as a jar and run on linux machine as part of a browserless automation. I tried Chrome Headless driver. All the steps are getting executed successfully and in the log statement i see success with the id for all the component which got created but when I login to the application these elements are not even created Is that I am missing any configuration?
The configuration I am using: System.setProperty("webdriver.chrome.driver", "<chromedrier_path>");ChromeOptions options = new ChromeOptions(); options.addArguments("headless");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.