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()
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()
def getCheckboxText(self, locatorType, locator, elem): text = ElementOperations.CheckBox(locatorType, locator, elem).getText() return text
def findRandomCheckbox(self, x): elem = ElementOperations.CheckBox(By.XPATH, self.CheckboxClick, x).random() return elem
def unselectCheckboxes(self): logger.info("Trying to click unselect all button") ElementOperations.CheckBox(By.XPATH, self.UnselectAll).click()