Last active
March 2, 2017 03:32
-
-
Save phpdave/f152439cf723b2dcc05ea99277a4f388 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Get composer | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
#Create composer.json in project | |
{ | |
"require-dev": { | |
"phpunit/phpunit": "*", | |
"facebook/webdriver": "dev-master" | |
} | |
} | |
#install dependencies via composer | |
php composer.phar install | |
#Get selenium-standalone http://www.seleniumhq.org/download/ and put it in the project folder and in the index.php run it | |
wget http://goo.gl/qTy1IB -O selenium-server-standalone.jar | |
<?php | |
exec("java -jar selenium-server-standalone.jar &", $output); | |
#Get Chrome browser extension to make it easy to right click and find an element's css selector | |
https://chrome.google.com/webstore/detail/copy-css-selector/kemkenbgbgodoglfkkejbdcpojnodnkg/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment