-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(webdriverjs): skip unloaded iframes (#743)
* fix(webdriverjs): skip unloaded iframes * suggestions * remove By * Update packages/webdriverjs/src/index.ts Co-authored-by: Gabe <41127686+Zidious@users.noreply.github.com> --------- Co-authored-by: Gabe <41127686+Zidious@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
91 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" id="lazy-loading-iframe-parent"> | ||
<head> | ||
<title>Lazy Loading Iframe Parent</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>iframe context test</h1> | ||
<div style="margin-top: 300vh"> | ||
<iframe id="lazy-iframe" src="https://www.youtube.com/embed/REDRiwmNunA" title="MONTHLY SPOTLIGHT" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" loading="lazy"> | ||
</iframe><iframe id="child" title="child" src="iframe-one.html"></iframe> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
14 changes: 14 additions & 0 deletions
14
packages/webdriverjs/test/fixtures/lazy-loaded-iframe.html
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,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" id="lazy-loading-iframe-root"> | ||
<head> | ||
<title>Lazy Loading Iframe Root</title> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>iframe context test</h1> | ||
<div style="margin-top: 300vh"> | ||
<iframe title="parent" id="parent" src="iframe-lazy-1.html" loading="lazy"></iframe> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |