Skip to content

Commit

Permalink
unittest.TestCase.assertTrue insted of assert <condition> (#101)
Browse files Browse the repository at this point in the history
since we use unittet.
  • Loading branch information
meni181818 committed Feb 17, 2022
1 parent d1ea809 commit 469d30d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/page-objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ where the page objects will be defined.
#Load the main page. In this case the home page of Python.org.
main_page = page.MainPage(self.driver)
#Checks if the word "Python" is in title
assert main_page.is_title_matches(), "python.org title doesn't match."
self.assertTrue(main_page.is_title_matches(), "python.org title doesn't match.")
#Sets the text of search textbox to "pycon"
main_page.search_text_element = "pycon"
main_page.click_go_button()
search_results_page = page.SearchResultsPage(self.driver)
#Verifies that the results page is not empty
assert search_results_page.is_results_found(), "No results found."
self.assertTrue(search_results_page.is_results_found(), "No results found.")

def tearDown(self):
self.driver.close()
Expand Down

0 comments on commit 469d30d

Please sign in to comment.