which headless browser automation is good

+4 votes
Hi,

For my use case i should take screenshots, navigate pages, perform click, submit forms and i will be using java as programming language.

i have done some research on this.

I'm confused between these 6 options:

1. HTML Unit - a. is it possible to take screenshots?   b. is it possible to run htmlunit without using selenium?

2. PhantomJS - can we run it without unit ghostdriver/phantomjsdriver/selenium from java code?

3. CasperJs - a. can we run it from without using selenium from java code? b. do we need to install this software or just having it as a dependency will work?

4. SlimerJs -  a. can we run it from without using selenium from java code? b. do we need to install this software or just having it as a dependency will work?

5. Headless firefox - a. is it possible to run without installing browser b. can we run using java

6. Headless chrome - a. is it possible to run without installing browser b. can we run using java

7. Splash - a. can we run it from without using selenium from java code? b. do we need to install this software or just having it as a dependency will work?
Nov 29, 2019 in Selenium by Siva
• 160 points
1,797 views
Hey @Siva, that's a really brilliant query! This thread gave me a great deal of info. Thanks!

1 answer to this question.

0 votes

To answer your Queries:

1. HTML Unit

  • taking screenshots is possible but needs to be customized to do so. 

  • You could use Html unit  as a testing framework instead of selenium. But if you are talking about HTML Unit driver it is a selenium webdriver and can't be isolated from it.

2. PhantomJS

  • Ghostdriver is the bridge we need to use Selenium WebDriver with Phantom.JS. It is possible but to run it without any of these but, writing raw PhantomJS script is not everyone’s cup of tea. Harness the power of PhantomJS combined with a test framework of your choice. But the latest versions of the PhantomJS driver comes with built-in ghost driver.

  • PhantomJS supports these languages that you could choose from, JavaScript, Python, Ruby, Java, C#, Haskell, Objective-C, Perl, PHP, R(via Selenium)

3. CasperJs -

  • CasperJS is a navigation scripting & testing utility for the PhantomJS (WebKit) and SlimerJS (Gecko) headless browsers, written in Javascript.

  • CasperJS supports JavaScript. You can run it from without using selenium from java code. 

  • You need to install the software or, you can call a CasperJS script directly with the phantomjs executable, but if you do so, you must set the phantom.casperPath property to the path where the library root is located on your system.You can run such a script like any other standard PhantomJS script.

4. SlimerJs -

  • SlimerJS is similar to PhantomJs, except that it runs Gecko, the browser engine of Mozilla Firefox, instead of Webkit (And it is not yet truly headless).

  • It supports Javascript.

5. Headless firefox -

  • You need to have the browser installed.

  •  Yes, you could run using java.

6. Headless Chrome -

  • You could open the Chrome binary from the command line. You certainly need Chrome installed on whatever machine executes the tests.

  • You could run it using Java.

7. Splash

  • Splash is a javascript rendering service with an HTTP API. It's a lightweight browser with an HTTP API, implemented in Python using Twisted and QT.

  • Yes, it is possible to run it from without using selenium from java code. It supports a lot of languages that you could use. 

  • You need to first install docker on your OS and then pull splash image and run it to install splash.

Depending on which language/script you are comfortable with, you could choose the headless browser for automation as per your requirements.

Hope this helps!

answered Nov 29, 2019 by Karan
• 19,610 points

edited Nov 29, 2019 by Sirajul

Related Questions In Selenium

0 votes
2 answers

What is a headless browser in automation testing and what are it's benefits?

Hi Sanaya, a headless browser is a web browser ...READ MORE

answered Aug 1, 2019 in Selenium by Abha
• 28,140 points
3,772 views
0 votes
0 answers

Which is good for automation testing? Tellurium or Selenium

 I am working on Selenium for some ...READ MORE

Jun 27, 2019 in Selenium by Surya
• 970 points
379 views
0 votes
1 answer
0 votes
1 answer

Which is better CSS or Xpath? Considering performance and cross browser testing

According to css has better performance compared ...READ MORE

answered Apr 17, 2018 in Selenium by Shubham
• 13,490 points
2,121 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
12,619 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,572 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
6,629 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,519 views
+1 vote
1 answer

How can I automate the process of adding iPhone to cart in Flipkart using Selenium(java),Page Object Model and TestNG? Also validate if product is added and available in cart?

Hey check this https://www.edureka.co/community/47160/automate-purchase-adding-book-cart-flipkart-using-selenium? It deals with a similar ...READ MORE

answered Jan 13, 2020 in Selenium by Karan
• 19,610 points
7,805 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP