I am curious to know whether anyone out there have tried mixing node.js headless browser packages like zombie.js (any other alternatives?) and selenium browser for testing web applications.
I am attracted to node.js headless browser packages because it's lighter and much faster than driving a full browser via selenium. However, none of the headless browser node packages seem to support accurate rendering of html pages with javascript.
So what about combining best of the both worlds? Revert to using selenium to render pages that zombie.js can't render? How do you go about accomplishing the latter? You'd need to know when a page has not rendered successfully on zombie.js and fire the page on selenium browser. However, wouldn't this create lag in waiting for selenium to bootup?
More importantly, what's the best headless browser node.js package besides zombie.js? Focus should be on page rendering. Do you think we'll ever see a node.js headless browser package replacing selenium in the future?
Selenium supports headless browser testing using HtmlUnitDriver. HtmlUnitDriver is based on java framework HtmlUnit and is the one of the lightweight and fastest among all headless browser.
You can run Google Chrome in headless mode simply by setting the headless property of the chromeOptions object to True. Or, you can use the add_argument() method of the chromeOptions object to add the –headless command-line argument to run Google Chrome in headless mode using the Selenium Chrome web driver.
Headless Browser Testing is a process of running the browser tests without the type of browser UI or GUI. In headless browser testing, to conduct cross-browser testing the tester can run test cases accurately and successfully without requiring the browser on which application needs to be tested.
Improved speed and performance Selenium tests can take a while to complete, due to elements on a page that the browser needs to load. Headless testing gets rid of this load time, allowing you to cut your testing times significantly. In our tests with headless testing, we've seen a 30% reduction of test execution times.
There is a headless testing tool called PhantomJS that is very good at rendering. However, it's not a Node.js package.
I'm also hoping it will be ported to Node.js soon, of find some other package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With