Last active
June 30, 2016 11:45
-
-
Save pyatil/cb63234058e9417ca66aa5d70a67c552 to your computer and use it in GitHub Desktop.
Revisions
-
pyatil revised this gist
Jun 30, 2016 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ 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 = '' -
pyatil created this gist
Jun 30, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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')