Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
关闭对话框selenium_Selenium_Selenium Chromedriver_Browser Automation - Fatal编程技术网

关闭对话框selenium

关闭对话框selenium,selenium,selenium-chromedriver,browser-automation,Selenium,Selenium Chromedriver,Browser Automation,我正在编写一个Selenium脚本,其中我试图消除下面的对话框 不幸的是,以下选项不起作用 driver.switchTo().alert().dismiss(); //OR setting following options options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.DISMISS); 我会尝试发送键输入或发送选项卡,然后输入。这取决于哪个按钮是激活的。 我还看到了无法使用Selenium处理的警报。是关于为

我正在编写一个Selenium脚本,其中我试图消除下面的对话框

不幸的是,以下选项不起作用

driver.switchTo().alert().dismiss();
//OR setting following options
options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.DISMISS);

我会尝试发送键输入或发送选项卡,然后输入。这取决于哪个按钮是激活的。


我还看到了无法使用Selenium处理的警报。是关于为什么会发生这种情况的更多信息。

我会尝试按Enter键或send Tab键发送,然后按Enter键。这取决于哪个按钮是激活的。


我还看到了无法使用Selenium处理的警报。提供了更多关于为什么会发生这种情况的信息。

建议的选项不起作用。因为问题中提到的对话框不是典型的javascript警报。这与协议处理程序配置有关。你知道如何用Java设置它吗?这里有一个答案是,它与Python一起工作,但建议的选项不起作用。因为问题中提到的对话框不是典型的javascript警报。这与协议处理程序配置有关。你知道如何用Java设置它吗?这里有一个答案,它可以与Python一起工作