Skip to content

Instantly share code, notes, and snippets.

@pyatil
Last active June 30, 2016 11:45
Show Gist options
  • Save pyatil/cb63234058e9417ca66aa5d70a67c552 to your computer and use it in GitHub Desktop.
Save pyatil/cb63234058e9417ca66aa5d70a67c552 to your computer and use it in GitHub Desktop.
class SeachMixin():
def _fillSeach(whatSeach):
self.path.xpath(self.SEACH_XPATH).text = whatSeach
def _clickButton():
self.path.xpath(self.SEACH_XPATH_BUTTON).click()
def seach(whatSeach):
self._fillSeach(whatSeach)
self._clickButton()
class Page1(SeachMixin):
SEACH_XPATH = ''
SEACH_XPATH_BUTTON = ''
def __init__(self):
self.page = xpath('lalala')
class Action():
def findSomething():
page = Page1()
page.seach('hmmmm')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment