feat(chromium): add 'waitForExpression' form field, deprecate 'waitWindowStatus' form field

This commit is contained in:
Julien Neuhart
2021-11-21 19:50:53 +01:00
parent 5b8391067d
commit ed47493459
4 changed files with 134 additions and 27 deletions

View File

@@ -285,6 +285,21 @@ func TestChromium_PDF(t *testing.T) {
WaitWindowStatus: "ready",
},
},
{
timeout: time.Duration(3) * time.Second,
URL: "file:///tests/test/testdata/chromium/html/sample2/index.html",
options: Options{
WaitForExpression: "window.status === 'foo'",
},
expectErr: true,
},
{
timeout: time.Duration(3) * time.Second,
URL: "file:///tests/test/testdata/chromium/html/sample2/index.html",
options: Options{
WaitForExpression: "window.status === 'ready'",
},
},
{
URL: "file:///tests/test/testdata/chromium/html/sample4/index.html",
options: Options{