我无法使用我的个人浏览器及其持久性数据来执行自动任务

I can't use my personal browser and its persistent data to do automatic tasks

提问人:Frnk 提问时间:11/16/2023 最后编辑:ggorlenFrnk 更新时间:11/16/2023 访问量:38

问:

我正在尝试将浏览器与所有用户数据一起使用,这样我就不会重复登录。当我运行时,它会返回一个空白页并抛给我一个错误。我正在使用稳定的浏览器。

about:blank
<launched> pid=1508
[pid=1508][err] [1116/010635.225:ERROR:settings.cc(410)] Settings version is not 1
[pid=1508][out] Opening in existing browser session.
 try (Playwright playwright = Playwright.create()) {
    BrowserType browserType = playwright.chromium();
    BrowserContext context = browserType.launchPersistentContext(
            Paths.get("C:\\Users\\frarm\\AppData\\Local\\Microsoft\\Edge\\User Data"),
            new BrowserType.LaunchPersistentContextOptions().setHeadless(false));
    Page page = context.newPage();
    page.navigate("https://www.google.com");
    System.out.println(page.title());
    context.close();
}
java playwright playwright-java

评论


答: 暂无答案