Question1:IDEA配置tomcat9后,控制台输出乱码:
Answer:apache-tomcat-9.0.35\conf下,logging.properties文件中:
java.util.logging.ConsoleHandler.encoding = UTF-8
#更改配置为
java.util.logging.ConsoleHandler.encoding = GBK
Question2:selenium java,eclipse加载chrome浏览器驱动报错
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 80
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
Answer:浏览器版本和驱动不兼容
(1)查看自己的chrome浏览器版本
(2)http://chromedriver.storage.googleapis.com/index.html 下载对应的版本驱动,可在各版本notes.txt中查看支持的浏览器版本
(3)代码中驱动地址替换成对应的版本