pub enum WaitUntil {
DomContentLoaded,
NetworkIdle,
Selector(String),
}Expand description
Condition to wait for after a navigation.
§Example
use stygian_browser::page::WaitUntil;
let w = WaitUntil::Selector("#main".to_string());
assert!(matches!(w, WaitUntil::Selector(_)));Variants§
DomContentLoaded
Wait for the Page.domContentEventFired CDP event — fires when the HTML
document has been fully parsed and the DOM is ready, before subresources
such as images and stylesheets finish loading.
NetworkIdle
Wait for the Page.loadEventFired CDP event and then wait until no
more than 2 network requests are in-flight for at least 500 ms
(equivalent to Playwright’s networkidle2).
Selector(String)
Wait until document.querySelector(selector) returns a non-null element.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaitUntil
impl RefUnwindSafe for WaitUntil
impl Send for WaitUntil
impl Sync for WaitUntil
impl Unpin for WaitUntil
impl UnwindSafe for WaitUntil
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more