예제 #1
0
 def selectRandomCheckbox(self, num):
     logger.info("Trying to select a random checkbox")
     path = self.PreCheckboxXpath + self.Checkbox
     pathtext = self.PreCheckboxXpath + self.CheckboxText
     elems = ElementOperations.CheckBox(By.XPATH, path)._finds()
     x = gamePageLogic.Logic().ReturnValidCheckboxes(
         pathtext, elems, self.select, self.unselect)
     x = gamePageLogic.Logic().ClickCheckboxes(x, num)
     elem = ElementOperations.CheckBox(By.XPATH, self.CheckboxClick,
                                       x).random().click()
예제 #2
0
 def sendCreditalsDropDown(self):
     ElementOperations.Button(By.XPATH, self.DropDownField).click()
     ElementOperations.DropDown(By.XPATH,
                                self.DropDownelements).random().click()
     ElementOperations.CheckBox(By.XPATH, self.StartCheckBox).click()
     ElementOperations.Button(By.XPATH, self.NextXpath).click()
예제 #3
0
 def getCheckboxText(self, locatorType, locator, elem):
     text = ElementOperations.CheckBox(locatorType, locator, elem).getText()
     return text
예제 #4
0
 def findRandomCheckbox(self, x):
     elem = ElementOperations.CheckBox(By.XPATH, self.CheckboxClick,
                                       x).random()
     return elem
예제 #5
0
 def unselectCheckboxes(self):
     logger.info("Trying to click unselect all button")
     ElementOperations.CheckBox(By.XPATH, self.UnselectAll).click()