from selenium import webdriver
wb = webdriver.Ie()
for i in range(5):
wb.get('http://www.baidu.com')
time.sleep(5)
print(i)
wb.quit()
为什么这个循环只能运行1次?
from selenium import webdriver
wb = webdriver.Ie()
for i in range(5):
wb.get('http://www.baidu.com')
time.sleep(5)
print(i)
wb.quit()
为什么这个循环只能运行1次?
import time
from selenium import webdriver
for i in range(5):
wb = webdriver.Ie() #浏览器窗口关闭后要重新创建
wb.get('http://www.baidu.com')
time.sleep(5)
print(i)
wb.quit()