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.

Revisions

  1. pyatil revised this gist Jun 30, 2016. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,12 @@
    class SeachMixin():
    def fillSeach(whatSeach):
    def _fillSeach(whatSeach):
    self.path.xpath(self.SEACH_XPATH).text = whatSeach
    def clickButton():
    def _clickButton():
    self.path.xpath(self.SEACH_XPATH_BUTTON).click()

    def seach(whatSeach):
    self.fillSeach(whatSeach)
    self._fillSeach(whatSeach)
    self._clickButton()

    class Page1(SeachMixin):
    SEACH_XPATH = ''
  2. pyatil created this gist Jun 30, 2016.
    20 changes: 20 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    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)

    class Page1(SeachMixin):
    SEACH_XPATH = ''
    SEACH_XPATH_BUTTON = ''

    def __init__(self):
    self.page = xpath('lalala')

    class Action():
    def findSomething():
    page = Page1()
    page.seach('hmmmm')