简体   繁体   English

无法在 ruby​​ watir 自动化中单击“确定”按钮

[英]Unable to click the OK button in ruby watir automation

When I am try to click the OK button, its showing me like OK clicked and the corresponding popover is not closing.Once that popover closed after OK button clicked, then only the data saved successfully.当我尝试单击“确定”按钮时,它显示我单击“确定”,并且相应的弹出窗口没有关闭。单击“确定”按钮后弹出窗口关闭,则只有成功保存的数据。 But here that pop is not closing once OK clicked.但是在这里,一旦单击“确定”,pop 就不会关闭。 Manualy its working.手动工作。

With what are you using watir, selenium?你用什么watir,硒? better do a script from the automation motor.最好从自动化电机做一个脚本。 The below example is for watir with AutoIt (for IE)以下示例适用于使用 AutoIt 的 watir(适用于 IE)

au3 = WIN32OLE.new("AutoItX3.Control")
au3.WinWaitActive("Authentication Required")
au3.Send("Domanin/userName")
au3.Send("{TAB}")
au3.Send("Pass")
au3.Send("{ENTER}")

for selenium would be similar.硒将是相似的。 See if this other SO answer works for you.看看这个其他 SO 答案是否适合您。 Alert Handling + Java + webdriver 警报处理 + Java + webdriver

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

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