selenium-如何多次循环某一个脚本
生活随笔
收集整理的這篇文章主要介紹了
selenium-如何多次循环某一个脚本
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 使用os模塊。?
cur--path = os.path.realpath("__file__”) 獲取當前腳本的真實路徑
curpath = ospath.dirname (?cur--path)獲取當前腳本的文件夾路徑??
?
2.apath = os.path.jion(curpath, "腳本.py")? ? ? ?# 拼接需要循環的腳本路徑
?
3.使用os.system 執行CMD命令? ?
for i in range(20):
os.system("python %s" % apath) # b腳本執行test_03.py腳本?
?
?
轉載于:https://www.cnblogs.com/fudan/p/8677000.html
總結
以上是生活随笔為你收集整理的selenium-如何多次循环某一个脚本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2017中国电商峰会共话“一带一路”网上
- 下一篇: 最新图解 FileZilla Serve