mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 15:40:04 +00:00
Extract Session.wait into a Runner
This is done for a couple reasons. The first is just to have things a little more self-contained for eventually supporting more advanced "wait" logic, e.g. waiting for a selector. The other is to provide callers with more fine-grained controlled. Specifically the ability to manually "tick", so that they can [presumably] do something after every tick. This is needed by the test runner to support more advanced cases (cases that need to test beyond 'load') and it also improves (and fixes potential use-after-free, the lp.waitForSelector)
This commit is contained in:
@@ -221,7 +221,7 @@ pub const WaitUntil = enum {
|
||||
load,
|
||||
domcontentloaded,
|
||||
networkidle,
|
||||
fixed,
|
||||
done,
|
||||
};
|
||||
|
||||
pub const Fetch = struct {
|
||||
@@ -400,8 +400,8 @@ pub fn printUsageAndExit(self: *const Config, success: bool) void {
|
||||
\\ Defaults to 5000.
|
||||
\\
|
||||
\\--wait_until Wait until the specified event.
|
||||
\\ Supported events: load, domcontentloaded, networkidle, fixed.
|
||||
\\ Defaults to 'load'.
|
||||
\\ Supported events: load, domcontentloaded, networkidle, done.
|
||||
\\ Defaults to 'done'.
|
||||
\\
|
||||
++ common_options ++
|
||||
\\
|
||||
|
||||
Reference in New Issue
Block a user