ChromeGetElementData


 

ChromeGetElementData>session_id,element_id,item_type,returnValue

 

Retrieves data from the given element. Requires a session_id created by ChromeStart and an element_id returned by ChromeFindElements.


 

item_type can be one of:

text - the inner text of the element

value - the value of the element if it has one (e.g. for inputs)

attribute/attribute_name - where attribute_name is a valid html attribute

Returns the value in the returnValue variable


 

See also: Chrome Functions

 

Example

 

Let>CHROMEDRIVER_EXE=c:\chromedriver.exe


 

//start a Chrome session

ChromeStart>session_id


 

//navigate to google.com

ChromeNavigate>session_id,url,https://www.google.com/


 

ChromeFindElements>session_id,id,main,elements

ChromeGetElementData>session_id,elements_1,text,theText

ChromeGetElementData>session_id,elements_1,attribute/innerHTML,theHtml