我对selenium IDE非常陌生。我试着从XML文件中读取。我在这个站点上看到了错误,但没有得到回答(据说错误与使用的xml文件有关,但似乎并非如此)
我得到的完全错误是:
错误意外异常:异常。URI方案对应于一个未知的协议处理程序“nsresult:"0x804b0012 (NS_ERROR_UNKNOWN_PROTOCOL)”位置:"JS框架::chrome://selenium-ide/content/tools.js -> -> ::IDEIncludeCommand.prototype.getIncludeDocumentBySynchronRequest ::IDEIncludeCommand.prototype.getIncludeDocumentBySynchronRequest 81“data: no。toString ->函数toString() {本机代码}、消息->、结果-> 2152398866、名称-> NS_ERROR_UNKNOWN_PROTOCOL、文件名-> chrome://selenium-ide/content/tools.js -> -> lineNumber -> 81、columnNumber -> 0、ide -> null、数据-> null、堆栈IDEIncludeCommand.prototype.getIncludeDocumentBySynchronRequest@chrome://selenium-ide/content/tools.js file:///C:/Rommel/user-extensions.js?1447329745072:81:5 xmlTestData.prototype.load@chrome://selenium-ide/content/tools.js -> file:///C:/Rommel/datadriven.js?1447329745073:53:19 Selenium.prototype.doLoadTestData@chrome://selenium-ide/content/tools.js -> file:///C:/RommelfnBind/retval@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60:12 ActionHandler.prototype.execute@chrome://selenium-ide/content/selenium-core/scripts/selenium-commandhandlers.js:314:28 ._executeCurrentCommand@chrome://selenium-ide/content/selenium-runner.js:306:19 TestLoop.prototype.resume@chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.联合材料:78:13 fnBind/retval@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60:12,file:///C:/Rommel/user-extensions.js?1447329745072 ::IDEIncludeCommand.prototype.getIncludeDocumentBySynchronRequest ::-> ::-> 81行
我是用selenium命令获得的: loadTestData
<tr>
<td>loadTestData</td>
<td>C:\Rommel\test_data_file.xml</td>
<td></td>
</tr>XML文件如下:
<testdata>
<test employee="1" type="1" startDate="01.01.2013" endDate="01.02.2013" />
<test employee="2" type="1" startDate="01.02.2013" endDate="01.03.2013" />
<test employee="3" type="1" startDate="01.03.2013" endDate="01.04.2013" />
</testdata>我使用下一个用户扩展名文件: sideflow.js、include.js、datadriven.js、goto_sel_ide.js。在某个地方,我读到扩展名文件的顺序很重要,但更改顺序并不能解决问题。
如果我将文件名留空,错误将持续存在,因此我的结论是,错误并不是由于XML文件的内容造成的。
我还试图从不同的站点获取扩展名文件,但它们似乎都是相同的。
我将非常感谢你的帮助。
发布于 2015-11-12 14:56:08
解决了:在经历了一天的挫折之后。我需要使用filepath: file:///C:/Rommel/test_data_file.xml
而不是
C:\Rommel\test_data_file.xml
https://stackoverflow.com/questions/33672227
复制相似问题