serbanghita / selenium-setup-webdriver
dev-master
2016-06-05 13:43 UTC
Requires
- php: ^5.4||^7.0
- facebook/webdriver: 1.0.*
This package is auto-updated.
Last update: 2024-12-19 06:12:41 UTC
README
Selenium-Setup-Webdriver is used to test the Selenium-Setup
service implementation.
It can also be used in testing environments, since it provides a WebDriver
and WebDriverConfig
factories.
It also comes with a BrowserTestCase
that you can use by extending your test cases.
Install
Install Selenium-Setup
git clone https://github.com/bogdananton/Selenium-Setup.git
cd Selenium-Setup
composer install
php selenium-setup start
- will start the default Selenium server- Alternatively use
php selenium-setup register yourServer
and changeyourServer.json
to your needs.
- Alternatively use
Install Selenium-Setup-Webdriver
git clone https://github.com/serbanghita/Selenium-Setup-Webdriver.git
cd Selenium-Setup-Webdriver
composer install
phpunit -c phpunit.xml
- will perform the checks from tests- Tinker with
phpunit.xml
if you want fast changes in your setup (proxy, selenium server, specific browser). Eg. connecting to a different Selenium host and port. - For extending your tests you need to override
setUp
method fromBrowserTestCase
and use your custom webdriver settings or the predefined fromSeleniumSetupWebDriver\WebDriver\WebDriverFactory
.
- Tinker with
Usage
Now that you have validated your environment setup, you have two options:
- Use
Selenium-Setup-Webdriver
as a dependency in your test project. When writing tests, extendSeleniumSetupWebDriver\TestCase\BrowserTestCase
. - Use your own web driver setup and connect to the server(s) raised by
Selenium-Setup
.