简体   繁体   English

如何阻止弹出窗口出现在 Jmeter WebDriver Sampler 上

[英]How to block pop ups from appearing on Jmeter WebDriver Sampler

Pop up picture I'm trying to set up a performance test in Jmeter using the Webdriver Sampler, and I'm having a lot of trouble with a particular pop up window that chrome throws half of the time.弹出图片我正在尝试使用 Webdriver Sampler 在 Jmeter 中设置性能测试,并且我在特定的弹出窗口 window 中遇到了很多麻烦,chrome 会抛出一半的时间。 It would save me a lot of time/trouble if someone knows how to disable pop ups in the first place within the Webdriver sampler or maybe through Jmeter or chromedriver config or maybe from setting browser options in the WebDriver sampler.如果有人知道如何首先在 Webdriver 采样器中禁用弹出窗口,或者可能通过 Jmeter 或 chromedriver 配置,或者可能通过在 WebDriver 采样器中设置浏览器选项,这将为我节省很多时间/麻烦。 Any help is greatly appreciated!!任何帮助是极大的赞赏!!

Without knowing the nature of this popup it is not possible to come up with the comprehensive solution, I can think only of one option for now:在不知道此弹出窗口的性质的情况下,不可能提出全面的解决方案,我现在只能想到一个选项:

  1. Open chrome://settings/content/popups URL in your browser在浏览器中打开chrome://settings/content/popups URL
  2. Toggle this switch:切换此开关:

    在此处输入图像描述

The switch is hidden in ShadowDOM so you will have to use WDS.browser.executeScript() function in order to get this and convert it to the WebElement该开关隐藏在 ShadowDOM 中,因此您必须使用WDS.browser.executeScript() function 来获取它并将其转换为WebElement

More information:更多信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM