TestOptimal Wiki

Model-Based Testing (MBT)

User Tools

Site Tools


Verify Web Element Attribute

Html elements have attributes, for example width, class, or even id. You can use $getAttr('localtor', 'attr name') to retrieve the value of the attribute for the element identified by the locator.

The method will cause failure if the element does not exist. To check if the element exists, use $isPresent('locator') or $getCount('xpath locator') methods.

faq_check_attribute_of_html_element.txt · Last modified: 2016/09/22 02:35 (external edit)