-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7946 from michalsn/feat/domparser-seeXPath
feat: domparser - ability to write more advanced expressions
- Loading branch information
Showing
6 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
// Check that h1 element which contains class "heading" is on the page | ||
if ($results->seeXPath('//h1[contains(@class, "heading")]')) { | ||
// ... | ||
} | ||
|
||
// Check that h1 element which contains class "heading" have a text "Hello World" | ||
if ($results->seeXPath('//h1[contains(@class, "heading")][contains(.,"Hello world")]')) { | ||
// ... | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
// Check that h1 element which contains class "heading" does NOT exist on the page | ||
if ($results->dontSeeXPath('//h1[contains(@class, "heading")]')) { | ||
// ... | ||
} | ||
|
||
// Check that h1 element which contains class "heading" and text "Hello World" does NOT exist on the page | ||
if ($results->dontSeeXPath('//h1[contains(@class, "heading")][contains(.,"Hello world")]')) { | ||
// ... | ||
} |