感谢您对该项目的持续开发/改进。它非常有用且功能齐全;)我一直在本地运行测试,并且效果很好——因为我正试图将事情转向纯粹的 CI 设置;此外,希望利用 Docker 和本地 Artifactory 来获取浏览器二进制文件。
在设置过程中——我注意到 webdrivermanager.properties 中的 URL 在通过 Artifactory 完成相同操作时呈现一个 XML 文件,它为我提供了一个 HTML 索引目录页面,其中包含给定浏览器二进制文件的所有版本。
错误输出如下:
`[chrome] Operating System: Linux
[chrome] 2018-06-05 13:58:09 WebDriverManager [main] [INFO]Reading https://artifactory.mycompany.com/chromedriver/ to seek chromedriver
[chrome] [Fatal Error] :1:55: White spaces are required between publicId and systemId.
[chrome] 2018-06-05 13:58:09 WebDriverManager [main] [ERROR]There was an error managing chromedriver 2.25 (org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 55; White spaces are required between publicId and systemId.)
[chrome] io.github.bonigarcia.wdm.WebDriverManagerException: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 55; White spaces are required between publicId and systemId.
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.getDriversFromXml(WebDriverManager.java:797)
[chrome] at io.github.bonigarcia.wdm.ChromeDriverManager.getDrivers(ChromeDriverManager.java:54)
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.filterCandidateUrls(WebDriverManager.java:492)
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:442)
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:219)
[chrome] at controllers._BrowserFactory.StartBrowser(_BrowserFactory.java:84)
[chrome] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[chrome] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[chrome] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[chrome] at java.lang.reflect.Method.invoke(Method.java:498)
[chrome] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
[chrome] at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
[chrome] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
[chrome] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
[chrome] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
[chrome] at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:168)
[chrome] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
[chrome] at org.testng.TestRunner.privateRun(TestRunner.java:648)
[chrome] at org.testng.TestRunner.run(TestRunner.java:505)
[chrome] at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
[chrome] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
[chrome] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
[chrome] at org.testng.SuiteRunner.run(SuiteRunner.java:364)
[chrome] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[chrome] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
[chrome] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
[chrome] at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
[chrome] at org.testng.TestNG.runSuites(TestNG.java:1049)
[chrome] at org.testng.TestNG.run(TestNG.java:1017)
[chrome] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:283)
[chrome] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
[chrome] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:120)
[chrome] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
[chrome] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
[chrome] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)
[chrome] Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 55; White spaces are required between publicId and systemId.
[chrome] at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
[chrome] at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.loadXML(WebDriverManager.java:807)
[chrome] at io.github.bonigarcia.wdm.WebDriverManager.getDriversFromXml(WebDriverManager.java:786)
[chrome] ... 34 more
`
我确实遇到了类似的线程https://github.com/bonigarcia/webdrivermanager/issues/157但希望您有任何想法。关于这个主题的替代方法。
非常感谢,萨米尔