How to not wait for something with Watir-Webdriver

*爱你&永不变心* 提交于 2019-12-02 06:48:53

The answer ended up being, and then handling the necessary waiting manually

element.focus
element.send_keys :return

Ruby 1.9.3/ IE 9 - I had a click_no_wait error. Watir would not trigger a click on the Save button, which had to be followed by a click on a java popup 'OK' button that confirmed that the save button had saved the document correctly.

Using these two lines in place of the click_no_wait command gets the code working perfectly:

element.focus 
element.send_keys :return

Thanks DVG. My code -

ie.button(:id, 'MainContent_B_Save').focus
ie.button(:id, 'MainContent_B_Save').send_keys :return 
ie. javascript_dialog.button('OK').click
Chuck van der Linden

If this is a Alert, Confirm, or Alert type JS popup, see this answer: https://stackoverflow.com/a/8172888/409820

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!