Skip to content

Commit

Permalink
Update selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
MatMoore committed Apr 9, 2024
1 parent 09b1316 commit 067fb0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/selenium/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def __init__(self, selenium):


class DataProductDetailsPage(Page):
def primary_heading(self):
return self.selenium.find_element(By.TAG_NAME, "h1")

def secondary_heading(self):
return self.selenium.find_element(By.TAG_NAME, "h2")

Expand Down
4 changes: 2 additions & 2 deletions tests/selenium/test_search_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ def click_on_the_first_result(self):
def verify_i_am_on_the_details_page(self, item_name):
assert item_name in self.selenium.title

secondary_heading_text = self.details_data_product_page.secondary_heading().text
heading_text = self.details_data_product_page.primary_heading().text

assert secondary_heading_text == item_name
assert heading_text == item_name

def enter_a_query_and_submit(self, query):
search_bar = self.search_page.search_bar()
Expand Down

0 comments on commit 067fb0e

Please sign in to comment.