DEV Community

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

 
ifuchs profile image
ifuchs

and what is button.one-and-a-half?

Thread Thread
 
mintzworld profile image
Michael Mintz

Not sure about getting the missing fonts on your MBP's Python env, but I've already updated the script on the DEV post to use a selector without the special font, and I'll be shipping that change to the SeleniumBase repo on GitHub within the hour. Thanks for finding that font issue on some Python environments!

Thread Thread
 
mintzworld profile image
Michael Mintz

button.one-and-a-half is another selector for the Enter button. It has that class name because the button is wider than other buttons on that keyboard.

Thread Thread
 
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.