Compare commits
1
Commits
next
..
07cc65e889
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07cc65e889 |
@@ -290,7 +290,6 @@ class Driver {
|
|||||||
`const el = document.querySelector(arguments[0]);
|
`const el = document.querySelector(arguments[0]);
|
||||||
if (document.readyState !== "complete" || !el) return false;
|
if (document.readyState !== "complete" || !el) return false;
|
||||||
if (el.closest(".hidden")) return false;
|
if (el.closest(".hidden")) return false;
|
||||||
if (getComputedStyle(el).visibility !== "visible") return false;
|
|
||||||
const r = el.getBoundingClientRect();
|
const r = el.getBoundingClientRect();
|
||||||
return r.width > 0 && r.height > 0;`,
|
return r.width > 0 && r.height > 0;`,
|
||||||
[selector],
|
[selector],
|
||||||
|
|||||||
@@ -348,7 +348,6 @@ async function visible(page, selector, timeout = 15000) {
|
|||||||
const el = document.querySelector(sel);
|
const el = document.querySelector(sel);
|
||||||
if (document.readyState !== "complete" || !el) return false;
|
if (document.readyState !== "complete" || !el) return false;
|
||||||
if (el.closest(".hidden")) return false;
|
if (el.closest(".hidden")) return false;
|
||||||
if (getComputedStyle(el).visibility !== "visible") return false;
|
|
||||||
const r = el.getBoundingClientRect();
|
const r = el.getBoundingClientRect();
|
||||||
return r.width > 0 && r.height > 0;
|
return r.width > 0 && r.height > 0;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user