Exemple #1
0
 def findComment(self, comment_id):
     path = self.commentTextStart + str(comment_id) + self.commentTextEnd
     text = ElementOperations.Label(By.XPATH, path).getText()
     user = path + self.back
     string = ElementOperations.Label(By.XPATH, user).getAttr(self.id)
     id = re.findall(self.pattern, string)[0]
     return [text, id]
    def checkPage(self):

        text = ElementOperations.Label(By.XPATH,
                                       self.Pageidentificator).getText()
        result = gamePageLogic.Logic().GetPageNumber(text)

        return result
    def __init__(self):
        self.cookieButtonXpath = "//div[@class='align__cell']/button"
        self.HideHelpXpath = "//span[@class='discrete']"
        self.TimerXpath = "//div[@class='timer timer--white timer--center']"
        self.UnselectAll = "//label[@for='interest_unselectall']"
        self.PasswordFieldXpath = "//input[@placeholder='Choose Password']"
        self.EmailFieldXpath = "//input[@placeholder='Your email']"
        self.DomainFieldXpath = "//input[@placeholder='Domain']"
        self.DropDownField = "//div[@class='dropdown__field']"
        self.DropDownelements = "//div[@class='dropdown__list-item']"
        self.PreCheckboxXpath = "//div[@class='avatar-and-interests__interests-list__item']"
        self.Checkbox = "/div/span/label"
        self.StartCheckBox = "//span[@class='checkbox__box']"
        self.CheckboxClick = ""
        self.CheckboxText = "/div/span[not(@class)]"  #ansector::
        self.select = "Select all"
        self.unselect = "Unselect all"
        self.NextXpath = "//div[@class='align__cell button-container__secondary']/a[@class='button--secondary']"
        self.Checkboxes = "//div[@class='avatar-and-interests__interests-list__item']"
        self.NextButton = "//button[@class='button button--stroked button--white button--fluid']"
        self.uploadImage = "//a[@class='avatar-and-interests__upload-button']"
        self.cookiesDiv = "//div[@class='cookies']"
        self.HelpHidden = "//div[@class='help-form is-hidden']"
        self.Pageidentificator = "//div[@class='page-indicator']"
        self.Page1Text = "1 "
        self.Unic2 = "//p[@class='avatar-and-interests__text']"
        self.Unic3 = "//div[@class='personal-details']"
        self.Page2Text = "2 "
        self.Page3Text = "3 "
        self.Page4Text = "4 "

        self.elemGetText = ElementOperations.Label(By.XPATH, "Xpath here")
Exemple #4
0
 def __init__(self, elem = ""):
     BaseForm.__init__(self, elem)
     self.mainPageButton = ElementOperations.Button(By.XPATH, "//li[@id='l_pr']/a")
     self.firstPostText = ElementOperations.Label(By.XPATH, "//div[@class='wall_post_cont _wall_post_cont']")
     self.id = "id"
     self.idPrefix = "wpt"
     self.partContainsDivClass = '//a[contains(@onclick, "'
     self.closeAfterVar = '") and contains(@title, "Нравится")]'
     self.commentTextStart = '//div[contains(@id, "'
     self.commentTextEnd = '")]/div[@class="wall_reply_text"]'
     self.parent = '//parent::div'
     self.imagePathStart = '//div[contains(@id, "'
     self.imagePathEnd = '") and @class = "wall_post_cont _wall_post_cont"]/div[@class="page_post_sized_thumbs  clear_fix"]/a'
     self.pattern = r"\d+"
     self.back = "/.."
     self.dwnld_path = 'resources/files/filename.png'
Exemple #5
0
 def findPostTextById(self, user_id, post_id):
     id = self.idPrefix + str(user_id) + "_" + str(post_id)
     text = ElementOperations.Label(By.ID, id).getText()
     return text
    def checkTimer(self):

        startTime = ElementOperations.Label(By.XPATH,
                                            self.TimerXpath).getText()
        return startTime
 def wait3page(self):
     ElementOperations.Label(By.XPATH, self.Unic3)._find()