Skip to content

alexKazarin/SeleniumSimpleSample_PHP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SeleniumSimpleSample_PHP

Installation on Windows

  • Load and install 'php VC11 x64 Thread Safe'. Add to system PATH. link
  • Install msvcr110.dll if needed. link
  • Install Composer-Setup.exe link
  • Load server-standalone 2.53.1 link
  • Load and install java jdk. link
  • Load compatible with php 5.6 version of phpunit 5.7.21. Place under C:\phpunit-5.7 link
    Run to check

C:\phpunit-5.7>php phpunit-5.7.21.phar --version
PHPUnit 5.7.21 by Sebastian Bergmann and contributors.

  • Load chromedriver and add to PATH link

Configuration

  • Create phpunit.cmd and add to system PATH for easy use link

cd C:\phpunit-5.7
echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
exit

  • Start selenium-server for Chrome

java -Dwebdriver.chrome.driver=C:\webdriver\chromedriver.exe -jar C:\selenium-server-standalone-2.53.1.jar

  • Compile in repository composer.json (was taken from facebook/php-webdriver)

composer install

Execution

  • Run test

php C:\phpunit-5.7\phpunit-5.7.21.phar Test.php

Allure

  1. xml generated automatically after test run
  2. to generate allure report use allure-comandline link

Generated report

TODO: organize PageObj structure