我已经下载了源代码,我认为代码is_string()已经存在ext/standard/,但我不确定.
我的目标:
\n在加载第一个页面(一个巨大的 html)时导航到第二个页面。
\n当前状态:
\n该脚本一直运行到最后,然后await browser.close()崩溃。
剧本:
\nconst { chromium } = require(\'playwright\');\n\n(async () => {\n const browser = await chromium.launch({ headless: false })\n const page = await browser.newPage()\n\n await page.setViewportSize({ width: 1200, height: 800 })\n\n // asynchronous loading\n page.goto(\'http://localhost:1234/index1.htm\')\n\n // wait for the button that navigates to another page\n await page.waitForSelector(\'#button1\');\n \n // button exists. Click it to navigate to index2.htm\n await page.click(\'#button1\')\n \n // await the #first_span element exists in index2.htm …Run Code Online (Sandbox Code Playgroud)