SilkTest Question:
Download Questions PDF

How to search for html link?

Answer:

A testcase for creating location. Silktest is reading location as html link. Locations are being stored alphabetically. But there is no tag associated with the latest tag (suppose its cg11). How to search for html link?


Below function is related to HTML Table. This function checks whether passed link-name is HTML link or not. "this" paramter is refered as "HtmlTable".
[+] BOOLEAN IsHtmlLink(STRING sLinkName)
[+] do
[ ] INTEGER iColCnt=0,iRowCnt=0,iNextCCnt,iNextRCnt
[ ] BOOLEAN bflag=FALSE
[ ] iColCnt=this.GetColumnCount()
[ ] iRowCnt=this.GetRowCount()
[ ]
[-] for (iNextRCnt=1;iNextRCnt<=iRowCnt;iNextRCnt++)
[-] if !bflag
[-] for (iNextCCnt=1;iNextCCnt<=iColCnt;iNextCCnt++)
[-] if (this.HtmlColumn("#{iNextCCnt}").GetRowText(iNextRCnt) == sLinkName
)
[-] if (Trim(this.HtmlColumn("#{iNextCCnt}").HtmlLink("#{iNextRCnt}").GetLocation()) !="")
[ ] bflag=TRUE
[ ] break
[ ]
[-] else
[ ] break
[ ]
[ ] return (bflag)
[-] except
[ ] return (FALSE)

Download SilkTest Interview Questions And Answers PDF

Previous QuestionNext Question
How to launch 2 web application windows simultaneously thru Silktest?How to validate that the data inserted via silktest is successfully inserted and the record of each user is found in the database?