简体   繁体   中英

How to run a python script multiple times?

I have an automation script and I want to run it 1000 times , how can I do it?

i want to automate some online tasks and i'm a beginner so i haven't tried anything yet

driver.find_element_by_xpath('//*[@id="password"]').click()

it's just a usual selenium script

You could include it in a for loop and do it 1000 times like this

    for x in range(1000):
      driver.find_element_by_xpath('//*[@id="password"]').click()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM