News for hackers. Stuff that matters.
Re:Consistent Selenium Testing in Python by alistproducer2 on Saturday September 02, 2017 @11:22AM (#15156393)
I've been working with selenium a lot at work recently. There are lots of little nuances to grok if you want your tests to run completely deterministic: especially on a JavaScript-heavy site.
Re:Consistent Selenium Testing in Python by danidiaz on Saturday September 02, 2017 @11:29AM (#15156445)
I try to use explicit waits whenever possible. Luckily, the Java client library provides a rich set of combinators for declaring them.

You can also define your own; they are basically functions from a WebDriver object to some other thing (usually a Boolean).

http://seleniumhq.github.io/selenium/docs/api/java/org/openq...

Re:Consistent Selenium Testing in Python by cdubzzz on Saturday September 02, 2017 @03:11PM (#15157686)
Oh wow, Java gives you a lot! Python's are actually pretty decent as well, I just came to rely almost entirely on "presence_of_element_located" with our Javascript-heavy app.
Re:Consistent Selenium Testing in Python by hinkley on Saturday September 02, 2017 @11:40PM (#15159567)
Have you ever gotten completely deterministic tests? I'm starting to think it may not be possible.
Re:Consistent Selenium Testing in Python by thevalermor on Sunday September 03, 2017 @10:13PM (#15165195)
Indeed, it is possible but requires some effort. Look at this project https://github.com/Skyscanner/pages. Choosing carefully your traits will do the trick.