Skip to content

Commit

Permalink
fixx ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Hoopmann committed Sep 6, 2023
1 parent 9d7e981 commit 0f78884
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ $page->waitUntilContainsElement('div[data-name=\"el\"]');
```

If a string is passed to `Page::waitUntilContainsElement`,
an instance of CSSSelector is created by default for internal `Page::waitForElement`.
an instance of CSSSelector is created by default in called internal `Page::waitForElement`.
To use other selectors, you can pass an instance of the required Selector instead of a string.

Wait for element by XPath selector:
Expand Down
7 changes: 4 additions & 3 deletions tests/PageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
*/
class PageTest extends BaseTestCase
{
public const WAIT_FOR_ELEMENT_HTML = '<div data-name="el">content</div>';
private const WAIT_FOR_ELEMENT_HTML = '<div data-name="el">content</div>';
private const WAIT_FOR_ELEMENT_RESOURCE_FILE = 'elementLoad.html';

public function testSetViewport(): void
{
Expand Down Expand Up @@ -436,7 +437,7 @@ public function testWaitUntilContainsElement(): void
$browser = $factory->createBrowser();
$page = $browser->createPage();

$page->navigate(self::sitePath('elementLoad.html'))->waitForNavigation();
$page->navigate(self::sitePath(static::WAIT_FOR_ELEMENT_RESOURCE_FILE))->waitForNavigation();

self::assertStringNotContainsString(static::WAIT_FOR_ELEMENT_HTML, $page->getHtml());

Expand All @@ -452,7 +453,7 @@ public function testWaitUntilContainsElementByXPath(): void
$browser = $factory->createBrowser();
$page = $browser->createPage();

$page->navigate(self::sitePath('elementLoad.html'))->waitForNavigation();
$page->navigate(self::sitePath(static::WAIT_FOR_ELEMENT_RESOURCE_FILE))->waitForNavigation();

self::assertStringNotContainsString(static::WAIT_FOR_ELEMENT_HTML, $page->getHtml());

Expand Down

0 comments on commit 0f78884

Please sign in to comment.