DEV Community

Discussion on: Solving the "Wordle" Game using Python and Selenium

 
ifuchs profile image
ifuchs

Thanks. I searched but did not find it in the seleniumbase docs.
Is there a way to run the pytest repetitively so that it shows each path to solution, waits a few seconds and does it again?

Thread Thread
 
mintzworld profile image
Michael Mintz

One: That button.one-and-a-half selector is part of the Wordle website:

<button data-key="↵" class="one-and-a-half">enter</button>
Enter fullscreen mode Exit fullscreen mode

Two: Here's an example SeleniumBase test for repeating tests: test_repeat_tests.py

Thread Thread
 
mintzworld profile image
Michael Mintz

All necessary updates to the SeleniumBase GitHub repo have been shipped.

Thread Thread
 
ifuchs profile image
ifuchs

I tried installing pytest-repeat and running
pytest --count=5 wordle_test.py but that only ran it once.

I'll see if I can use your examples do cause it to repeat.

Thread Thread
 
mintzworld profile image
Michael Mintz

pytest-repeat is an external plugin that won't work on tests that inherit unittest.TestCase.