def sendOption(cls, optionContent): seleniumutil.wait_element(page_pulish.VOTE_INPUT_OPTION) list = seleniumutil.getElements(page_pulish.VOTE_INPUT_OPTION) i = 0 for con in optionContent: list[i].send_keys(con) i += 1
def getOptionName(cls): seleniumUtil.wait_element(page_vote.VOTE_LINK_OPTIONNAME) elements = seleniumUtil.getElements(page_vote.VOTE_LINK_OPTIONNAME) names = [] for element in elements: names.append(element.text) return names
def getNumberOfVotes(cls): seleniumUtil.wait_element(page_vote.VOTE_LINK_MESSAGE) elements = seleniumUtil.getElements(page_vote.VOTE_LINK_MESSAGE) i = 0 votes = [] for element in elements: if (i + 1) % 2 == 0: votes.append(element.text) i += 1 return votes
def clickChecked(cls, i): seleniumUtil.wait_element(page_delete.DELETE_CHECKED_SELECT) list = seleniumUtil.getElements(page_delete.DELETE_CHECKED_SELECT) list[i].click()
def returnadminreplyCount(cls): seleniumutil.wait_element(page_pulish.REPLYADMIN_TEXT_NUM) return int( seleniumutil.getElements(page_pulish.REPLYADMIN_TEXT_NUM)[0].text)
def returnblockscount(cls): seleniumutil.wait_element(page_home.PUBLISH_LINK_BLOCKS) list = seleniumutil.getElements(page_home.PUBLISH_LINK_BLOCKS) count = len(list) return count
def clickPublishInOther(cls, i): seleniumutil.wait_element(page_home.PUBLISH_LINK_BLOCKS) list = seleniumutil.getElements(page_home.PUBLISH_LINK_BLOCKS) list[i].click()
def clickChoiceMessage(cls, i): seleniumUtil.wait_element(page_vote.VOTE_RADIO_VOTE) element = seleniumUtil.getElements(page_vote.VOTE_RADIO_VOTE) element[i].click()