code: def get_attribute(self, selector, attribute, by=By.CSS_SELECTOR,
                        timeout=settings.SMALL_TIMEOUT):
          
          if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
              timeout = self.__get_new_timeout(timeout)
          if page_utils.is_xpath_selector(selector):
              by = By.XPATH
          if page_utils.is_link_text_selector(selector):
              selector = page_utils.get_link_text_from_selector(selector)
              by = By.LINK_TEXT
          self.wait_for_ready_state_complete()
          time.sleep(0.01)
          element = page_actions.wait_for_element_present(
              self.driver, selector, by, timeout)
          try:
              attribute_value = element.get_attribute(attribute)
          except (StaleElementReferenceException, ENI_Exception):
              self.wait_for_ready_state_complete()
              time.sleep(0.06)
              element = page_actions.wait_for_element_present(
                  self.driver, selector, by, timeout)
              attribute_value = element.get_attribute(attribute)
          if attribute_value is not None:
              return attribute_value
          else:
              raise Exception("Element {%s} has no attribute {%s}!" % (
                  selector, attribute))
docs: This method uses JavaScript to get the value of an attribute.