Update example tests

This commit is contained in:
Michael Mintz 2022-10-29 23:29:55 -04:00
parent 292f443bc3
commit be282a9884
14 changed files with 23 additions and 13 deletions

View File

@ -1,3 +1,4 @@
"""Test the SeleniumBase Calculator App with SeleniumBase."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase methods to interact with "canvas" elements."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase to test a Coffee Cart App."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase methods to interact with console logs."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,6 +1,8 @@
""" TAG:contains("TEXT") is a special, non-standard CSS Selector """
that gets converted to XPath: '//TAG[contains(., "TEXT")]' TAG:contains("TEXT") is a special, non-standard CSS Selector
before it's used by Selenium calls. Also part of jQuery. """ that gets converted to XPath: '//TAG[contains(., "TEXT")]'
before it's used by Selenium calls. Also part of jQuery.
"""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -3,10 +3,12 @@ from seleniumbase import BaseCase
class CycleTests(BaseCase): class CycleTests(BaseCase):
def test_cycle_elements_with_tab_and_press_enter(self): def test_cycle_elements_with_tab_and_press_enter(self):
""" Test pressing the tab key to cycle through elements. """
Then click on the active element and verify actions. Test pressing the tab key to cycle through elements.
This can all be performed by using a single command. Then click on the active element and verify actions.
The "\t" is the tab key. The "\n" is the RETURN key. """ This can all be performed by using a single command.
The "\t" is the tab key. The "\n" is the RETURN key.
"""
self.open("seleniumbase.io/demo_page") self.open("seleniumbase.io/demo_page")
self.assert_text("This Text is Green", "#pText") self.assert_text("This Text is Green", "#pText")
self.send_keys("html", "\t\t\t\t\n") self.send_keys("html", "\t\t\t\t\n")

View File

@ -1,3 +1,4 @@
"""Test double_click() after switching into iframes."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase to download files and verify."""
import math import math
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase to download images and verify."""
import os import os
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,6 +1,4 @@
""" """Test drag_and_drop() on different pages."""
Testing Drag & Drop on different pages.
"""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""Use SeleniumBase methods to interact with iframes."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,3 +1,4 @@
"""A SeleniumBase test for verifying Login functionality on Swag Labs."""
from seleniumbase import BaseCase from seleniumbase import BaseCase

View File

@ -1,6 +1,4 @@
""" Solve the Wordle game using SeleniumBase. """Solve Wordle with SeleniumBase. (No longer uses Shadow-DOM)"""
The latest version of Wordle no longer uses Shadow-DOM. """
import ast import ast
import random import random
import requests import requests

View File

@ -1,3 +1,4 @@
"""Test that SeleniumBase can autodetect and use xpath selectors."""
from seleniumbase import BaseCase from seleniumbase import BaseCase