2023-02-03 13:27:36 +08:00
|
|
|
"""Test an error page with the "highlight() command, which uses a
|
|
|
|
JavaScript animation to point out page objects that are found.
|
|
|
|
If an element isn't visible, the test fails with an exception."""
|
2020-06-01 02:46:15 +08:00
|
|
|
from seleniumbase import BaseCase
|
2023-02-03 13:27:36 +08:00
|
|
|
BaseCase.main(__name__, __file__)
|
2020-06-01 02:46:15 +08:00
|
|
|
|
|
|
|
|
2021-03-11 06:27:52 +08:00
|
|
|
class ErrorPageTests(BaseCase):
|
2020-06-01 02:46:15 +08:00
|
|
|
def test_error_page(self):
|
|
|
|
self.open("https://seleniumbase.io/error_page/")
|
|
|
|
self.highlight('img[alt="500 Error"]')
|
|
|
|
self.highlight("img#parallax_octocat")
|
|
|
|
self.highlight("#parallax_error_text")
|
|
|
|
self.highlight('img[alt*="404"]')
|
|
|
|
self.highlight("img#octobi_wan_catnobi")
|
|
|
|
self.highlight("img#speeder")
|
2023-07-19 03:18:35 +08:00
|
|
|
self.save_screenshot_after_test = True
|