How to get a Selenium/Ruby bot to wait before performing an action?

前端 未结 7 773
Happy的楠姐
Happy的楠姐 2020-12-16 21:28

I\'m building a Selenium/Ruby web bot that clicks on elements. The problem is, sometimes there isn\'t enough time for the page to load before the bot decides it can\'t find

相关标签:
7条回答
  • 2020-12-16 22:33

    Just use

    sleep(number_of_seconds)
    

    Then you can wait for it.

    0 讨论(0)
提交回复
热议问题