3. How to start - Rafal-Laskowski/Metalloid-WebDriver-Pool GitHub Wiki
Metalloid-WebDriver-Pool is driven by properties.
Most of us set them in maven-surefire-plugin
but there are multiple ways on handling that.
- Property
browser.name
tells Metalloid-WebDriver-Pool which browser you want to run. Possible options are:
- chrome
- ff
- firefox
- ie
- internet explorer
- edge
- You still need to set
webdriver.chrome.driver
(or similar) property to point out location of the driver. close.browser.by.default
allows you automatically invokedriver.quit()
after each test. Possible options are:
- true
- false
Just keep in mind, that if you set this value to false
you should close the driver by yourself.
To close the driver just use WebDriverPool.closeSession()
. Metalloid-WebDriver-Pool will figure out which driver you want to close by itself :)
window.size
tells Metalloid-WebDriver-Pool to what size do you want to set created browsers. Possible options:
- maximized
- ????x???? where ? is any number. Example: 1920x1860
hub.url
need to be provided if you want to run the tests against Selenium Gridheadless
- self-explanatorybrowser.type
tells Metalloid-WebDriver-Pool if you run the tests on your local machine or do you use Selenium Grid Possible values:
- local
- remote
So, if you want to simply run Chrome browser on your local computer, without specifying any additional options you just need to set:
browser.name
tochrome
webdriver.chrome.driver
property- (Optional)
close.browser.by.default
totrue
- (Optional)
window.size
tomaximized
- (Optional)
headless
totrue