测试脚本是否支持在不同浏览器运行
firefox浏览器运行脚本
from selenium import webdriver
driver=webdriver.Firefox()
driver.get("http://baidu.com")
assert "sss" in driver.title
driver.quit()
chrome浏览器运行脚本
from selenium import webdriver
import os
chromedriver="C:Program Files (x86)Chromechromedriver.exe"
os.environ['webdriver.chrome.driver']=chromedriver
driver=webdriver.Chrome(chromedriver)
driver.get("http://baidu.com")
assert "sss" in driver.title
driver.quit()