File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11<?php
22// An example of using php-webdriver.
3+ // Do not forget to run composer install before and also have Selenium server started and listening on port 4444.
34
45namespace Facebook \WebDriver ;
56
89
910require_once ('vendor/autoload.php ' );
1011
11- // start Firefox with 5 second timeout
12+ // start Chrome with 5 second timeout
1213$ host = 'http://localhost:4444/wd/hub ' ; // this is the default
13- $ capabilities = DesiredCapabilities::firefox ();
14+ $ capabilities = DesiredCapabilities::chrome ();
1415$ driver = RemoteWebDriver::create ($ host , $ capabilities , 5000 );
1516
1617// navigate to 'http://www.seleniumhq.org/'
17- $ driver ->get ('http ://www.seleniumhq.org/ ' );
18+ $ driver ->get ('https ://www.seleniumhq.org/ ' );
1819
1920// adding cookie
2021$ driver ->manage ()->deleteAllCookies ();
5758 )
5859);
5960
60- // close the Firefox
61+ // close the browser
6162$ driver ->quit ();
You can’t perform that action at this time.
0 commit comments