Skip to content

Commit ebbe729

Browse files
authored
Merge pull request #65 from ThomasLandauer/patch-1
Added Scenario Metadata
2 parents 9f510ba + a84fb94 commit ebbe729

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Codeception/Module/WebDriver.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,20 @@
299299
* until it finally tries to find the form by XPath).
300300
* If speed is a concern, it's recommended you stick with explicitly specifying the locator type via the array syntax.
301301
*
302+
* ### Get Scenario Metadata
303+
*
304+
* You can inject `\Codeception\Scenario` into your test to get information about the current configuration:
305+
* ```php
306+
* use Codeception\Scenario
307+
* public function myTest(AcceptanceTester $I, Scenario $scenario)
308+
* {
309+
* if ('firefox' === $scenario->current('browser')) {
310+
* // ...
311+
* }
312+
* }
313+
* ```
314+
* See [Get Scenario Metadata](https://codeception.com/docs/07-AdvancedUsage#Get-Scenario-Metadata) for more information on `$scenario`.
315+
*
302316
* ## Public Properties
303317
*
304318
* * `webDriver` - instance of `\Facebook\WebDriver\Remote\RemoteWebDriver`. Can be accessed from Helper classes for complex WebDriver interactions.

0 commit comments

Comments
 (0)