testng+maven+selenium之爬坑记录 - testng.xml is not a valid file和unable to find valid certification path。

问题:楼主选择的自动化测试组合是Java+testng+maven+selenium,遇到的坑是

testng.xml is not a valid file和unable to find valid certification path to requested target,

解决方案:1、testng.xml is not a valid file的原因是pom文件中testng.xml的路径不对,修改其路径为你自己的文件所在位置即可

2、unable to find valid certification path to requested target的原因是testng.xml文件中开头是

正确的应该是http,即

这是问题解决后的正确配置供参考

pom文件:

testng+maven+selenium之爬坑记录 - testng.xml is not a valid file和unable to find valid certification path。_第1张图片

testng+maven+selenium之爬坑记录 - testng.xml is not a valid file和unable to find valid certification path。_第2张图片

testng.xml文件:

testng+maven+selenium之爬坑记录 - testng.xml is not a valid file和unable to find valid certification path。_第3张图片

你可能感兴趣的:(selenium自动化测试,java)