Getting Selenium to pause for X seconds

后端 未结 6 2087
小蘑菇
小蘑菇 2020-12-06 16:24

What I am trying to accomplish is browsing to a page, waiting for something to load and then taking and saving a screenshot.

The code I already have is



        
6条回答
  •  一个人的身影
    2020-12-06 16:58

    The most simple of all.

    Just try this and forget rest! The equivalent of this code can be used in any language. I am writing this in python.

    import time
    time.sleep(2)
    

    this will make the compiler go to sleep for 2 seconds.

提交回复
热议问题