Search code examples
rubywatir-webdriver

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. Manualy its working.


Solution

  • With what are you using watir, selenium? better do a script from the automation motor. The below example is for watir with AutoIt (for 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. Alert Handling + Java + webdriver