--xvfbto use the xvfb virtual display if elements aren't displaying in headless mode. You'll need a new version of SeleniumBase for that. The
ElementNotInteractable Exceptionmeans there was an overlay that covered the element you wanted to click. You'll either need to wait for the overlay to go away, or try using
Any way to exclude page url comparsion from Visual Regression Testing. Because I have this problem, I am testing the same site on different staging servers.
So for example
have identical tag and attributes, but just tests fails because URLs are different
May be workaround will be if is possible to compare only URL structure after domain part
--lf, --last-failed - to only re-run the failures. --ff, --failed-first - to run the failures first and then the rest of the tests.
@nramisetty7 First create a lock file:
import fasteners my_lock_file = fasteners.InterProcessLock("my_lock_file.lock") with my_file_lock: # DO SOMETHING HERE
Then in the "# DO SOMETHING HERE" section, create another file and write to it, incrementing the test count for each test completed. When all your tests are complete, (the count will reach the total test count), and you can perform that special tearDown that you wanted to do when all tests complete.
pytest.mark.lastas that might not take into account a combination with xdist (eg.
-n 5). I didn't write that marker, so if there's an issue with it, that would be on pytest's end. However, you can call a tearDown that runs after all other tests have run if you use my earlier post on creating a lock file and using that to increment a counter so that you know for sure when all other tests have completed, and you can run a custom tearDown with all the browser methods that you need.
pytestis the framework that runs SeleniumBase tests, so things of that nature would be covered by existing pytest plugins. Also, some pytest plugins require the use of the SeleniumBase
sbfixture format for compatibility reasons. See syntax formats 3, 4, 6, 7, and 8 from https://seleniumbase.io/help_docs/syntax_formats/ .
@go000o There are a few reasons that your logging data might not be shown. You may need to change the level first, example:
Or if you're running multithreaded tests, (
-n=3 for example), then logging won't get displayed by default because the tests would be running in separate subprocesses. There's a Stack Overflow article on that: https://stackoverflow.com/a/46111048