Reputation: 753
I'm writing test in python using selenium webdriver and it's a real pain to debug it. Let's say my test is like this:
Then:
Is there anyways to make the debugging easy?
Upvotes: 1
Views: 9110
Reputation: 2722
If you are writing user tests, you may want to consider going one step higher and embrace BDD as your testing suite. There is fabulous library for it in python: lettuce, There is a Selenium webdriver for it.
This should make it much easier for you, as it will provide you not only with a very nice way to store, read and manage tests but also a common-ground between them (called terrain) where you can spawn browsers at various states, or even just pass along one from scenario to scenario if that is required.
Heck with use of hooks you can restart the state of a browser between states, which seems to be exactly what are you looking for.
Upvotes: 4