code: def wait_for_attribute(self, locator, attribute, value, params=None, timeout=5):
          
          def _do_wait():
              element = self.get_present_element(locator, params)
              return value in self.get_attribute(element, attribute)
  
          ActionWait(timeout).until(_do_wait, "Attribute never set!")
docs: Waits for an element attribute to get a certain value.
  
          Note: This function re-get's the element in a loop to avoid caching or stale element issues.
  
          :Example:
              Wait for the class attribute to get 'board-hidden' value
  
          :param locator: locator tuple
          :param attribute: element attribute
          :param value: attribute value to wait for
          :param params: (optional) locator params
          :param timeout: (optional) maximum waiting time (in seconds) (default: 5)
          :return: None