Update example tests

This commit is contained in:
Michael Mintz 2024-01-24 20:44:18 -05:00
parent 99efb86618
commit 343b312fdd
3 changed files with 6 additions and 4 deletions

View File

@ -15,6 +15,6 @@ class GitHubTests(BaseCase):
self.highlight("div.Layout-sidebar")
self.assert_element("div.repository-content")
self.assert_text("SeleniumBase", "strong a")
self.click('a[title="seleniumbase"]')
self.js_click('a[title="seleniumbase"]')
self.slow_click('td[class*="large"] a[title="fixtures"]')
self.assert_element('td[class*="large"] a[title="base_case.py"]')

View File

@ -6,6 +6,9 @@ BaseCase.main(__name__, __file__)
class DownloadImages(BaseCase):
def test_download_images_directly(self):
if self._multithreaded:
self.open_if_not_url("about:blank")
self.skip("Skipping test in multi-threaded mode.")
self.open("seleniumbase.io/examples/chart_maker/ReadMe")
img_elements_with_src = self.find_elements("img[src]")
unique_src_values = []
@ -27,7 +30,6 @@ class DownloadImages(BaseCase):
def test_download_images_via_screenshot(self):
if self.recorder_mode:
self.open("about:blank")
print("Skipping test in Recorder Mode.")
self.skip("Skipping test in Recorder Mode.")
self.open("seleniumbase.io/error_page/")
img_elements_with_src = self.find_elements("img[src]")

View File

@ -24,8 +24,8 @@ class HackingTests(BaseCase):
self.highlight("h1.b_logo", loops=8)
self.highlight_click('[href*="github.com/seleniumbase/SeleniumBase"]')
self.highlight_click('[href="/seleniumbase/SeleniumBase"]')
self.highlight_click('a[title="examples"]')
self.assert_text("examples", "#file-name-id-wide")
self.assert_text("SeleniumBase", "strong a")
self.js_click('a[title="examples"]')
self.highlight('td[class*="large"] a[title="test_hack_search.py"]')
self.click('td[class*="large"] a[title="test_hack_search.py"]')
self.assert_text("test_hack_search.py", "#file-name-id-wide")