Skip to content

Commit

Permalink
Add strict CSS locator example for see() and dontSee()
Browse files Browse the repository at this point in the history
  • Loading branch information
weshooper authored and Naktibalda committed Nov 20, 2016
1 parent ae6770c commit 4c06915
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Codeception/Lib/Interfaces/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ public function amOnPage($page);
*
* ``` php
* <?php
* $I->see('Logout'); // I can suppose user is logged in
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
* $I->see('Sign Up', '//body/h1'); // with XPath
* $I->see('Logout'); // I can suppose user is logged in
* $I->see('Sign Up', 'h1'); // I can suppose it's a signup page
* $I->see('Sign Up', '//body/h1'); // with XPath
* $I->see('Sign Up', ['css' => 'body h1']); // with strict CSS locator
* ```
*
* Note that the search is done after stripping all HTML tags from the body,
Expand Down Expand Up @@ -56,9 +57,10 @@ public function see($text, $selector = null);
*
* ```php
* <?php
* $I->dontSee('Login'); // I can suppose user is already logged in
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
* $I->dontSee('Sign Up','//body/h1'); // with XPath
* $I->dontSee('Login'); // I can suppose user is already logged in
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
* $I->dontSee('Sign Up','//body/h1'); // with XPath
* $I->dontSee('Sign Up', ['css' => 'body h1']); // with strict CSS locator
* ```
*
* Note that the search is done after stripping all HTML tags from the body,
Expand Down

0 comments on commit 4c06915

Please sign in to comment.