User Tools

Site Tools


element

Differences

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

Link to this comparison view

element [2019/12/17 12:13] (current)
Line 1: Line 1:
 +====== element ======
 +----
 +element - Perform actions on the html element
 +
 +
 +===== Description =====
 +  element("​$tag_search","​$attribute_search","​$attribute_value"​)
 +  element("​$tag_search","​$attribute_search","​$attribute_value","​$action"​)
 +  element("​$tag_search","​$attribute_search","​$attribute_value","​$attribute_info"​)
 +  element("​$tag_search","​$attribute_search","​$attribute_value","​$attribute_change","​$new_value"​)
 +  ​
 +This function returns a string
 +
 +
 +===== Parameters =====
 +** $tag_search **\\
 +The html tag to search\\
 +Tags can be: "​a","​div","​span","​img",​ ...
 +
 +** $attribute_search **\\
 +The <a> attribute to search to identify the element\\
 +Attributes examples: "​id",​ "​name",​ "​style",​ ...
 +
 +** $attribute_value **\\
 +The value of the attribute to be found
 +
 +** $action **\\
 +Action values:\\
 +"​click"​ - Performs a click in the element\\
 +"​focus"​ - Set the focus to the element
 +
 +** $attribute_info **\\
 +The attribute you want to retrieve\\
 +Special attributes:​\\
 +"​innerhtml"​ - Gets the innerhtml of the element\\
 +"​textcontent"​ - Gets the text content of the element\\
 +
 +** $attribute_change **\\
 +The attribute to change the value
 +
 +** $new_value **\\
 +The new value of the attribute to change
 +
 +===== Examples =====
 +  navigate("​http://​diaboliclabs.com/​testpage"​)
 +  sleep(5)
 +  element("​input","​id","​firstname","​value","​hello"​)
 +  sleep(5)
  
element.txt ยท Last modified: 2019/12/17 12:13 (external edit)