Skip to content

assertNotAttribute (UI Automation - Interrogation)

Compatible with:
  • Purpose
  • Generated from getAttribute(attributeLocator) 
  • Gets the value of an element attribute and compares it with the pattern given in Value. The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example). 
  • Here the specified attribute should not be present. If the attribute is present on the UI this command returns that particular attribute value and aborts the execution.
  • Syntax
  • assertNotAttribute(attributeLocator, pattern)
  • Target
  • attributeLocator -  an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar"
  • Value
  • pattern
  • Return Value
  • Returns true or false
 

Feedback and Knowledge Base