Skip to content

Commit 17881d2

Browse files
committed
Prefer Chrome in example script
1 parent a6d9992 commit 17881d2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

example.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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

45
namespace Facebook\WebDriver;
56

@@ -8,13 +9,13 @@
89

910
require_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();
@@ -57,5 +58,5 @@
5758
)
5859
);
5960

60-
// close the Firefox
61+
// close the browser
6162
$driver->quit();

0 commit comments

Comments
 (0)