代码如下:driver是保存的根据不同传入值选择不同浏览器
from selenium import webdriver
import time
import csv
import driver
browser_text = ['chrome', 'firefox', 'ie', 'qq']
for text in browser_text:
print(browser)
driver = driver.driver_choose(text)
driver.maximize_window()
driver.get("http://www.baidu.com")
driver.find_element_by_name("wd").send_keys("selenium")
driver.find_element_by_id("su").click()
time.sleep(3)
print(driver.title)
driver.quit()