开发者

Selenium Test Suite: differing paths to test cases

开发者 https://www.devze.com 2023-03-05 07:32 出处:网络
I have a test suite that does the following log in do tests log out since I want to reuse log in and log out with other test suites I moved them into a separate folder and referenced those test ca

I have a test suite that does the following

  1. log in
  2. do tests
  3. log out

since I want to reuse log in and log out with other test suites I moved them into a separate folder and referenced those test cases in the href field e.g.

a href="..\lib\fLogIn.html"

Selenium however raises an exception that it can't find the file in question. I tried all sorts of URLs,开发者_JAVA技巧 e.g.

file:///E:\absolute\path\lib\fLogIn.html

file:///E:/absolute/path/lib/fLogIn.html

../lib/fLogIn.html

..//lib//fLogIn.html

..\lib\fLogIn.html

etc.

I even tried to access them through a webserver.. no success.

Does anyone have an idea as to how this can be solved?

I really want to reuse test cases.

Thanks a lot

Juergen

PS: forgot to add: I am using Windows OS


Try to move all the reusable functions to an upper level class and using them accordingly.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号