右键单击并使用 Playwright 选择适当的项目。

huangapple go评论85阅读模式
英文:

Right mouse click and selecting the appropriate item using Playwright

问题

Once the page loads, Is there a way to select the option from right click

Example: I am using locator and able to perform right click

await page.getByRole("document").click( { button: "right" });
Now I would like to click on "View Page Source". Is there an option to do this using Playwright

Basically, the use case is to automate. I expect a different item in the right click which will be useful in automating.

右键单击并使用 Playwright 选择适当的项目。

英文:

Once the page loads, Is there a way to select the option from right click

Example: I am using locator and able to perform right click

await page.getByRole("document").click( { button: "right" });
Now I would like to click on "View Page Source" . Is there an option to do this using Playwright

Basically, the use case is to automate. I expect a different item in the right click which will be useful in automating.

右键单击并使用 Playwright 选择适当的项目。

答案1

得分: 1

这个功能不受 Playwright 支持。看起来像是类似这个问题 https://github.com/microsoft/playwright-python/issues/676

英文:

This functionality is not supported by Playwright. Seems like a similar issue like this https://github.com/microsoft/playwright-python/issues/676.

huangapple
  • 本文由 发表于 2023年5月17日 17:29:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76270574.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定