Wait for element to load when testing an iOS app using Appium and Ruby?

后端 未结 4 1318
我在风中等你
我在风中等你 2021-02-06 03:23

I am testing an iOS app, and can\'t interact with the elements after logging in because Appium is going too fast.

Can someone please point me to an example of using a We

4条回答
  •  情歌与酒
    2021-02-06 04:03

    I use this construction to wait some element appears:

    wait_true { exists { find_element(:xpath, path_to_element) } }
    

    Of course, you can find not only by :xpath.

    Also you can set timeout:

    wait_true(timeout) { exists { find_element(:xpath, path_to_element) } }
    

提交回复
热议问题