这篇文章主要是讲的在现实生活中的实际平台测试
chromedriver:
1.报错:
Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
解决方案:编译的程序没有权限操作chromedriver
import os
os.chmod('/path/to/chromedriver', 0o755)
2.报错
Chrome Driver Error using Selenium: Unable to Discover Open Pages
解决方案:1.无法根治options.add_argument(’–no-sandbox’),第一条不可行
2.chromedriver的版本太低~提高版本
google-chrome --version
在https://chromedriver.storage.googleapis.com/index.html下载对应版本driver,并保存到abr_browser_dir中
3.其他报错
driver.set_page_load_timeout(10)要注释掉!!!!!
4.url = ‘localhost/’ + ‘myindex_’ + abr_algo + '.html’要改成url = ‘localhost:8333/’ + ‘myindex_’ + abr_algo + ‘.html’;8333是在代码mpc_Server.py中找到的