Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import unittest
- import page
- from selenium import webdriver
- class PythonOrgSearch(unittest.TestCase):
- def setUp(self):
- self.driver = webdriver.Chrome("C:\Program Files\chromedriver.exe")
- self.driver.get("https://www.python.org")
- def test_search_python(self):
- mainPage = page.MainPage(self.driver)
- assert mainPage.is_title_matches()
- mainPage.search_text_element = 'pycon'
- mainPage.click_go_button()
- search_result_page = page.SearchResultPage()
- assert search_result_page.is_results_found()
- def tearDown(self):
- self.driver.close()
- if __name__ == '__main__':
- unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement