Skip to content

Commit

Permalink
Merge pull request #386 from aik099/readme-example-fix
Browse files Browse the repository at this point in the history
Correct usage example in the README.md
  • Loading branch information
aik099 committed Mar 16, 2024
2 parents a637df5 + 38dc757 commit a3a5370
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ use Behat\Mink\Mink,
Behat\Mink\Session,
Behat\Mink\Driver\Selenium2Driver;

use Selenium\Client as SeleniumClient;
require_once __DIR__ . '/vendor/autoload.php';

$browser = 'firefox';
$browserName = 'firefox';
$url = 'http://example.com';

$mink = new Mink(array(
'selenium2' => new Session(new Selenium2Driver($browser, null, $url)),
'selenium2' => new Session(new Selenium2Driver($browserName)),
));

$mink->getSession('selenium2')->getPage()->findLink('Chat')->click();
$session = $mink->getSession('selenium2');
$session->visit($url);

$session->getPage()->findLink('Chat')->click();
```

Please refer to [MinkExtension-example](https://github.com/Behat/MinkExtension-example) for an executable example.
Expand Down

0 comments on commit a3a5370

Please sign in to comment.