项目作者: sridharbandi

项目描述 :
PHP Facebook Webdriver & PHPUnit Example Project with Page Object Model
高级语言: PHP
项目地址: git://github.com/sridharbandi/Selenium-PHPUnit-Template.git
创建时间: 2018-05-31T22:08:57Z
项目社区:https://github.com/sridharbandi/Selenium-PHPUnit-Template

开源协议:

下载


PHP Facebook Webdriver & PHPUnit Example Project with Page Object Model

How to use?

Create the Page Objects of your Web application under pageobjects package, call those Page Objects in PHPUnit tests under tests package (Sample Page Objects, testcase included in this template)

How to run?

To install the dependencies issue the below commands in project root directory

  1. composer update

PHP and Composer to be installed as prerequisite.

Run Selenium Server with required Webdriver binaries, example with chromedriver as below

  1. java -Dwebdriver.chrome.driver=/path/to/chromedriver -jar /path/to/selenium server/selenium-server-standalone-x.x.x.jar

To run the tests issue the below command in project root directory

  1. ./vendor/bin/phpunit tests

By default it runs in Chrome browser, you can specify which browser to use as well

  1. ./vendor/bin/phpunit tests firefox

Browsers added in this template are

  • chrome
  • firefox
  • ie
  • opera
  • edge
  • safari
  • phantomjs

Feel free to modify it to your own needs :)