serbanghita/selenium-setup-webdriver

dev-master 2016-06-05 13:43 UTC

This package is auto-updated.

Last update: 2024-04-19 04:51:30 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

  1. git clone https://github.com/bogdananton/Selenium-Setup.git
  2. cd Selenium-Setup
  3. composer install
  4. php selenium-setup start - will start the default Selenium server
    1. Alternatively use php selenium-setup register yourServer and change yourServer.json to your needs.

Install Selenium-Setup-Webdriver

  1. git clone https://github.com/serbanghita/Selenium-Setup-Webdriver.git
  2. cd Selenium-Setup-Webdriver
  3. composer install
  4. phpunit -c phpunit.xml - will perform the checks from tests
    1. 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.
    2. For extending your tests you need to override setUp method from BrowserTestCase and use your custom webdriver settings or the predefined from SeleniumSetupWebDriver\WebDriver\WebDriverFactory.

Usage

Now that you have validated your environment setup, you have two options:

  1. Use Selenium-Setup-Webdriver as a dependency in your test project. When writing tests, extend SeleniumSetupWebDriver\TestCase\BrowserTestCase.
  2. Use your own web driver setup and connect to the server(s) raised by Selenium-Setup.