How to search for html link?
Submitted by: AdministratorA 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)
Submitted by: Administrator
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)
Submitted by: Administrator
Read Online SilkTest Job Interview Questions And Answers
Top SilkTest Questions
☺ | How to search for html link? |
☺ | How to read .xls file contents without using the ddt wizard? |
☺ | Need help regd. silk test runing thr .bat file on cmd prompt? |
☺ | How to launch 2 web application windows simultaneously thru Silktest? |
☺ | Can SilkTest run on Mac? |
Top Application Program Categories
☺ | AutoCAD Interview Questions. |
☺ | Microsoft Office Interview Questions. |
☺ | Microsoft Outlook Interview Questions. |
☺ | Microsoft Excel Interview Questions. |
☺ | WPF Interview Questions. |