selenium 测试应用程序路径问题测试未在选定的 url 上运行

发布于 2024-09-19 12:31:01 字数 663 浏览 4 评论 0原文

我尝试使用命令行启动我的硒测试,但测试被触发到 http://mycomputer 并且不要 http://mycomputer/myapplication

D:\projectsnet\Production\MyWebTests\tools\selenium-server>java -jar selenium-
server.jar -Dhttp.proxyHost=mycomputer -Dhttp.proxyport=4444 -htmlSuite "*firefox" "ht
tp://mycomputer/myapplication/" "D:\mypathtotestssuites\0001-testsuite.html" "c:\temp\result.html"

在测试用例中我有链接

<link rel="selenium.base" href="http://mycomputer/myapplication/" />

I try to start my selenium test using command line but test are fired to http://mycomputer and not to http://mycomputer/myapplication

D:\projectsnet\Production\MyWebTests\tools\selenium-server>java -jar selenium-
server.jar -Dhttp.proxyHost=mycomputer -Dhttp.proxyport=4444 -htmlSuite "*firefox" "ht
tp://mycomputer/myapplication/" "D:\mypathtotestssuites\0001-testsuite.html" "c:\temp\result.html"

In test cases I have got link

<link rel="selenium.base" href="http://mycomputer/myapplication/" />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哭泣的笑容 2024-09-26 12:31:01

这是设计使然。

如果您正在针对 http://mycomputer/myapplication/ 进行开发,那么我建议您http://mycomputer 作为您的基本URL,然后添加

open | /myapplication/

到测试的顶部。

This is by design.

If you are doing development against http://mycomputer/myapplication/ then I would recommend that you do http://mycomputer as your baseURL and then add

open | /myapplication/

To the top of your tests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文