File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2121 */
2222class PageTest extends BaseTestCase
2323{
24- private const WAIT_FOR_ELEMENT_HTML = '<div data-name="el">content </div><div data-name=""el""></div> ' ;
24+ private const WAIT_FOR_ELEMENT_HTML = '<div data-name="el">content1 </div><div data-name=""el"">content2 </div> ' ;
2525 private const WAIT_FOR_ELEMENT_RESOURCE_FILE = 'elementLoad.html ' ;
2626
2727 public function testSetViewport (): void
@@ -445,7 +445,9 @@ public function testWaitUntilContainsElement(): void
445445 $ page ->waitUntilContainsElement ('div[data-name=el] ' ); // search for <div data-name="el">
446446 $ page ->waitUntilContainsElement ('div[data-name=\"el\"] ' ); // search for <div data-name=""el"'>
447447
448- self ::assertStringContainsString (self ::WAIT_FOR_ELEMENT_HTML , $ page ->getHtml ());
448+ self ::assertStringContainsString (self ::WAIT_FOR_ELEMENT_HTML , strtr ($ page ->getHtml (), [
449+ '" ' => '" ' ,
450+ ]));
449451 }
450452
451453 public function testWaitUntilContainsElementByXPath (): void
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ <h1>page a</h1>
1414 el . innerHTML = 'content' ;
1515
1616 document . body . appendChild ( el )
17+
18+ let el2 = document . createElement ( 'div' ) ;
19+
20+ el2 . dataset . name = '"el"' ;
21+ el2 . innerHTML = 'content' ;
22+ document . body . appendChild ( el2 )
1723 } , 500 )
1824</ script >
1925</ html >
You can’t perform that action at this time.
0 commit comments