mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-28 15:40:04 +00:00
feat: fetch add wait_until parameter for page loads options
Add `--wait_until` and `--wait_ms` CLI arguments to configure session wait behavior. Updates `Session.wait` to evaluate specific page load states (`load`, `domcontentloaded`, `networkidle`, `fixed`) before completing the wait loop.
This commit is contained in:
@@ -415,7 +415,7 @@ fn runWebApiTest(test_file: [:0]const u8) !void {
|
||||
defer try_catch.deinit();
|
||||
|
||||
try page.navigate(url, .{});
|
||||
_ = test_session.wait(2000);
|
||||
_ = test_session.wait(2000, .load);
|
||||
|
||||
test_browser.runMicrotasks();
|
||||
|
||||
@@ -439,7 +439,7 @@ pub fn pageTest(comptime test_file: []const u8) !*Page {
|
||||
);
|
||||
|
||||
try page.navigate(url, .{});
|
||||
_ = test_session.wait(2000);
|
||||
_ = test_session.wait(2000, .load);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user