1.找不到浏览器
需安装PyVirtualDisplay
安装的时候发现pip不好用,只能用pip.exe
2.执行Firefox的时候log报错
###!!! [Parent][MessageChannel] Error: (msgtype=0x2E007D,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
JavaScript error: resource://app/modules/ContentCrashHandlers.jsm, line 75: TypeError: browser.permanentKey is not a non-null object
###!!! [Parent][MessageChannel] Error: (msgtype=0x2E007D,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
org.openqa.selenium.remote.ProtocolHandshake createSession
INFORMATION: Detected dialect: W3C
###!!! [Parent][MessageChannel] Error: (msgtype=0x2E007D,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv
换了n个浏览器版本+driver版本
最后发现是因为火狐加载了一个vpn插件。。禁用了就可以了
3.输出的report路径挂载在tomcat上,却403/404
因为tomcat默认的设置不是实时reload
需要在/conf/sever.xml下的host标签中加一行
<Context path="tomcat部署路径" docBase="文件夹相对or绝对路径" debug="0" reloadable="true"/>