Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from element import BasePageElement
- from locator import *
- class SearchTextElement(BasePageElement):
- locator = 'q'
- class BasePage(object):
- def __init__(self, driver):
- self.driver = driver
- class MainPage(BasePage):
- search_text_element = SearchTextElement()
- def is_title_matches(self):
- return "Python" in self.driver.title
- def click_go_button(self):
- element = self.driver.find_element(*MainPageLocators.GO_BUTTON)
- element.click()
- class SearchResultPage():
- def is_results_found(self):
- return "No results found. " not in self.driver.page_source
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement