Confused with Robot
I have a problem and was wondering if someone could help me. I looked at all the messages that I could, the online documentation, etc, but maybe I am just stupid.
The problem I have is that after I initiate a search in the app, a grid is returned (5 lines, 6 columns). The items in the first columns are all links to go to a detailed screen. I just cannot figure out how to differentiate each of the links. Heck, I cannot get Robot to do some value checking either as all the text looks like regular text on a web page (no fields).
Would a kind soul be willing to share some sample source (for Robot) that I could use to check the number of links (if can vary from 0 to 10), and how to do string verification on a web page?
Hopefully, this is not too stupid a question.
I just do not find the help all that helpful.
Re: Confused with Robot
Yes. It is very difficult when one has identical looking links. Note that though the links look similar on the web page, if one views the HTML source code for the link i.e. the anchor tag, it will be different for each. WE can use this difference to get the desired link.
We too had a similar problem. So we used the SQAGetCHildren function to get all the children items contained on that HTML page into an string array. Then we loop through this array searching for the (existence) links using the Instr function.
For eg. IF your webpage Title is "View The Details", use:
SQAGetChildren("Type=HTMLDocument;HTMLTitle=View The Details", myarrayname) to get all the children into myarrayname. Then loop through this array and search for all links of "Type=HTMLLink;HTMLText=Edit" and again put them into another array. Then again loop through this array, searching for the desired "different" characters in the links.
[This message has been edited by sachinus (edited 05-09-2003).]