MarketSquare / robotframework-seleniumlibrary-java

Java port of the Python based SeleniumLibrary for Robot Framework
Apache License 2.0
23 stars 16 forks source link

How to run headless chrome? #38

Closed pmandayam closed 6 years ago

pmandayam commented 6 years ago

Hello,

I see that we can now run headless chrome in version 3.9.1.0.

How do we do this? What argument do we pass in to "open browser" ?

Thanks

Hi-Fi commented 6 years ago

Documentation: http://search.maven.org/remotecontent?filepath=com/github/hi-fi/robotframework-seleniumlibrary/3.9.1.0/robotframework-seleniumlibrary-3.9.1.0.html

Headless browsers can be opened as any other browser using "Open browser" -keyword. Arguments:

Browser Name(s)
Firefox firefox, ff
Firefox (headless) firefoxheadless, ffheadless
Google Chrome googlechrome, chrome, gc
Google Chrome (headless) googlechromeheadless, chromeheadless, gcheadless
Internet Explorer internetexplorer, ie
Edge edge
Safari safari
Opera opera
Android android
Iphone iphone
PhantomJS phantomjs
HTMLUnit htmlunit
HTMLUnit with Javascript htmlunitwithjs
JBrowser jbrowser

For driver automatic download, please check the repos pom-file, as library is tested at Travis with those headless browsers, too.