forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add seeXPath to DOMParser class
- Loading branch information
Showing
5 changed files
with
99 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
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")]')) { | ||
// ... | ||
} |