robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

SeLib tests not runnable with RF >= 2.5 #133

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by spielman... on 6 Sep 2010

The utils package doesn't contain "is_windows" any more, which run_tests.py relies on. Thus, it is not possible to run the tests (both unit and acceptance) contained in SL >= 2.4 with RF >= 2.5 installed.

I was able to work around this by simply replacing "utils.is_windows" by "True", which is certainly not a valid fix ;-)

spooning commented 9 years ago

Originally submitted to Google Code by @pekkaklarck on 6 Sep 2010

You can fix the affected lines e.g. like this:

suffix = utils.is_windows and 'ybot.bat' or 'ybot'

=> suffix = 'ybot' if os.sep == '/' else 'ybot.bat'

Using x if expr else y syntax instead of the expr and x or y hack is more clear. It only works with [PJ]ython 2.5 but that ought to be fine in the start-up script. It seems you can remove the import utils line too after the changes.

spooning commented 9 years ago

Originally submitted to Google Code by spielman... on 10 Sep 2010

I reviewed and extended Janne's fix for the acceptance tests. r92 contains my change. In r93, I also fixed run_unit_tests.py, which wouldn't run the unit tests on direct invocation because the method being called was unknown (run_tests instead of run_unit_tests).

spooning commented 9 years ago

Originally submitted to Google Code by spielman... on 10 Sep 2010

r3a0c42075d4947c1d5a6c49c96deab714ea69f6d and r42be38c7484136ea4b81be76baa56bbed80f5fe4 of course...