Update examples
This commit is contained in:
parent
29a2df5201
commit
353dc29444
|
@ -196,7 +196,7 @@ class HackTests(BaseCase):
|
||||||
self.set_text_content('a[prettyslug="your-profile"]', "BASE")
|
self.set_text_content('a[prettyslug="your-profile"]', "BASE")
|
||||||
self.set_text_content('a[prettyslug="connect-tools"]', "ARE")
|
self.set_text_content('a[prettyslug="connect-tools"]', "ARE")
|
||||||
self.set_text_content('a[prettyslug="administration"]', "BELONG")
|
self.set_text_content('a[prettyslug="administration"]', "BELONG")
|
||||||
self.set_text_content('a[prettyslug="tutorials"]', "TO US")
|
self.set_text_content('a[prettyslug*="tutorials"]', "TO US")
|
||||||
self.set_text_content("h1.article_title", aybabtu)
|
self.set_text_content("h1.article_title", aybabtu)
|
||||||
self.highlight("h1", loops=4, scroll=False)
|
self.highlight("h1", loops=4, scroll=False)
|
||||||
self.highlight("div#global_menu", loops=2, scroll=False)
|
self.highlight("div#global_menu", loops=2, scroll=False)
|
||||||
|
@ -205,7 +205,7 @@ class HackTests(BaseCase):
|
||||||
self.highlight('a[prettyslug="your-profile"]', loops=2, scroll=False)
|
self.highlight('a[prettyslug="your-profile"]', loops=2, scroll=False)
|
||||||
self.highlight('a[prettyslug="connect-tools"]', loops=1, scroll=False)
|
self.highlight('a[prettyslug="connect-tools"]', loops=1, scroll=False)
|
||||||
self.highlight('a[prettyslug="administration"]', loops=1, scroll=False)
|
self.highlight('a[prettyslug="administration"]', loops=1, scroll=False)
|
||||||
self.highlight('a[prettyslug="tutorials"]', loops=2, scroll=False)
|
self.highlight('a[prettyslug*="tutorials"]', loops=2, scroll=False)
|
||||||
self.highlight("h1.article_title", loops=5, scroll=False)
|
self.highlight("h1.article_title", loops=5, scroll=False)
|
||||||
|
|
||||||
self.open("https://kubernetes.io/")
|
self.open("https://kubernetes.io/")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""Use SeleniumBase to download files and verify."""
|
"""Use SeleniumBase to download files and verify."""
|
||||||
import math
|
import math
|
||||||
from seleniumbase import BaseCase
|
from seleniumbase import BaseCase
|
||||||
|
BaseCase.main(__name__, __file__)
|
||||||
|
|
||||||
|
|
||||||
class DownloadTests(BaseCase):
|
class DownloadTests(BaseCase):
|
||||||
|
|
|
@ -14,4 +14,4 @@ class ErrorPageTests(BaseCase):
|
||||||
self.highlight('img[alt*="404"]')
|
self.highlight('img[alt*="404"]')
|
||||||
self.highlight("img#octobi_wan_catnobi")
|
self.highlight("img#octobi_wan_catnobi")
|
||||||
self.highlight("img#speeder")
|
self.highlight("img#speeder")
|
||||||
self.save_screenshot_after_test = True # Automatic if test fails
|
self.save_screenshot_after_test = True
|
||||||
|
|
|
@ -36,5 +36,6 @@ class TestGeolocation(BaseCase):
|
||||||
self.open("https://www.openstreetmap.org/")
|
self.open("https://www.openstreetmap.org/")
|
||||||
self.click("span.geolocate")
|
self.click("span.geolocate")
|
||||||
self.assert_url_contains("48.87645/2.26340")
|
self.assert_url_contains("48.87645/2.26340")
|
||||||
|
self.save_screenshot_to_logs()
|
||||||
if not (self.headless or self.headless2 or self.xvfb):
|
if not (self.headless or self.headless2 or self.xvfb):
|
||||||
self.sleep(2.5)
|
self.sleep(2.5)
|
||||||
|
|
Loading…
Reference in New Issue