How to sleep webdriver in python for milliseconds

前端 未结 3 1211
清酒与你
清酒与你 2020-11-22 04:36

I am using the time library in my script:

import time
time.sleep(1)

It can sleep my webdriver for 1 second but I need to sleep

3条回答
  •  一个人的身影
    2020-11-22 04:46

    time.sleep() takes a floating-point argument:

    time.sleep(0.25)
    

    Docs (they're worth a read not least because they explain the conditions under which the sleep could end up being shorter or longer than expected).

提交回复
热议问题