UI自动化之webdriver高级应用将文件下载到指定路径
from selenium import webdriver
import unittest, time
class TestDemo(unittest.TestCase):
def setUp(self):
# 创建Chrome浏览器配置对象实例
chromeOptions = webdriver.ChromeOptions()
# 设定下载文件的保存目录为C盘的iDownload目录,
# 如果该目录不存在,将会自动创建
prefs...