We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46e75f3 commit 988577dCopy full SHA for 988577d
examples/form-submit.php
@@ -13,12 +13,15 @@
13
$page->navigate('file://' . __DIR__ . '/html/form.html')->waitForNavigation();
14
15
// put 'hello' in the input and submit the form
16
-$page->evaluate(
+$evaluation = $page->evaluate(
17
'(() => {
18
document.querySelector("#myinput").value = "hello";
19
document.querySelector("#myform").submit();
20
})()'
21
-)->waitForPageReload();
+);
22
+
23
+// wait for the page to be reloaded
24
+$evaluation->waitForPageReload();
25
26
// get value in the new page
27
$value = $page->evaluate('document.querySelector("#value").innerHTML')->getReturnValue();
0 commit comments