2022-07-04 03:48:46 +08:00
|
|
|
from seleniumbase import BaseCase
|
2023-01-19 13:07:40 +08:00
|
|
|
BaseCase.main(__name__, __file__)
|
2022-07-04 03:48:46 +08:00
|
|
|
|
|
|
|
|
|
|
|
class CycleTests(BaseCase):
|
|
|
|
def test_cycle_elements_with_tab_and_press_enter(self):
|
2022-10-30 11:29:55 +08:00
|
|
|
"""
|
|
|
|
Test pressing the tab key to cycle through elements.
|
|
|
|
Then click on the active element and verify actions.
|
|
|
|
This can all be performed by using a single command.
|
|
|
|
The "\t" is the tab key. The "\n" is the RETURN key.
|
|
|
|
"""
|
2022-07-04 03:48:46 +08:00
|
|
|
self.open("seleniumbase.io/demo_page")
|
|
|
|
self.assert_text("This Text is Green", "#pText")
|
|
|
|
self.send_keys("html", "\t\t\t\t\n")
|
|
|
|
self.assert_text("This Text is Purple", "#pText")
|