IEGetTagsByAttrib


 

IEGetTagsByAttrib>URL,Tagname,Attrib=Value,ReturnType,ArrayVar

 

This function will return an array of tag values for all tags of the given tag name and attribute value in the IE window whose URL matches or contains the specified URL.

 

URL: The current URL of the IE window to extract from.  This can be a substring.  If using a substring and you have multiple IE windows open try to be unique to ensure a correct match.

 

Tagname: The name of the tags to extract.  E.g. "A", "INPUT" or "DIV".  This can be any tag type.

 

Attrib=Value: Specify an identifying attribute and value.  E.g.: class=image

 

ReturnType: Use: "H" to return innerHTML (i.e. the HTML between the opening and closing tags); "O" to return outerHTML (includes the HTML in the tag itself) or "T" for innerText (the text that appears between the opening and closing tags).

 

ArrayVar: The variable name to store the results in.  ArrayVar_Count will contain the number of items returned.

 

This function can be used to extract data from web pages.  Use a loop and RegEx/EasyPatterns or similar to further identify specific elements.

 

Fore more control of Internet Explorer (navigating, waiting for documents to complete, file downloads, clicking, form filling and extracting) use the IEAuto library which comes with WebRecorder, an optional Macro Scheduler add-on.

 

See also: IETagEvent, IEGetTags, IETagEventByAttrib, IEWait

 

Example

 

//get an array of result DIVs

IEGetTagsByAttrib>amazon.co.uk,DIV,classname=rslt prod,T,pageResults