This commit is contained in:
Karl Seguin
2025-03-11 10:51:40 +08:00
parent 5182edce6f
commit e3409a27e7
2 changed files with 7 additions and 2 deletions

View File

@@ -147,6 +147,7 @@ const TestContext = struct {
const BrowserContextOpts = struct {
id: ?[]const u8 = null,
target_id: ?[]const u8 = null,
session_id: ?[]const u8 = null,
};
pub fn loadBrowserContext(self: *TestContext, opts: BrowserContextOpts) !*main.BrowserContext(TestCDP) {
@@ -163,6 +164,10 @@ const TestContext = struct {
bc.id = id;
}
if (opts.target_id) |tid| {
bc.target_id = tid;
}
if (opts.session_id) |sid| {
bc.session_id = sid;
}