Differences

This shows you the differences between two versions of the page.

Link to this comparison view

faq_check_attribute_of_html_element [2016/09/22 02:35] (current)
Line 1: Line 1:
 +===== 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.
Print/export
QR Code
QR Code faq_check_attribute_of_html_element (generated for current page)