如何使用python保存使用selenium生成的日志
发布时间:2020-05-27 17:28:09 所属栏目:Python 来源:互联网
导读:我正在使用网络驱动程序2.20并创建了自动化套装.不像 selenium RC(get_log函数)我无法弄清楚要保存的命令 生成的日志. 我试过了 : FirefoxProfile p = new FirefoxProfile(); p.setPreference(webdriver.log .file, /tmp/firefox_console); WebDriver driv
|
我正在使用网络驱动程序2.20并创建了自动化套装.不像
FirefoxProfile p = new FirefoxProfile();
p.setPreference("webdriver.log .file","/tmp/firefox_console");
WebDriver driver = new FirefoxDriver(p);
但是找不到python的等价物. 解决方法以下内容将为您做同样的事情. python代码没有内部日志.from selenium import webdriver
p = webdriver.FirefoxProfile()
p.set_preference("webdriver.log.file","/tmp/firefox_console")
driver = webdriver.Firefox(p) (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
