예제 #1
0
 def get_response_vote_count(self, response_id):
     vote_count_css = '.response_{} .discussion-response .action-vote'.format(
         response_id)
     vote_count_element = self.browser.find_element_by_css_selector(
         vote_count_css)
     # To get the vote count, one must hover over the element first.
     hover(self.browser, vote_count_element)
     return self._get_element_text(
         ".response_{} .discussion-response .action-vote .vote-count".
         format(response_id))
예제 #2
0
 def get_response_vote_count(self, response_id):
     vote_count_css = '.response_{} .discussion-response .action-vote'.format(response_id)
     vote_count_element = self.browser.find_element_by_css_selector(vote_count_css)
     # To get the vote count, one must hover over the element first.
     hover(self.browser, vote_count_element)
     return self._get_element_text(".response_{} .discussion-response .action-vote .vote-count".format(response_id))