Forum Discussion

platha's avatar
platha
Occasional Contributor
15 years ago

Dynamically I am unable to get the Standard and Action methods

Hi,



I have a simple web application with a table and hyper links in each row of the table. I am trying to click particular link using VBscript. I am able to do this in IE with no issue. Below is the code I have used for it.



 Set allLinks=gamesPage.Panel("page").Panel("MyContent").getElementsByTagName("A")


 For each link in allLinks


       Dim strLocation, outerHtmlTxt

       strLocation = aqString.Find(link.outerHTML,"xyz", 1)

       If strLocation <> -1 Then

          link.Click

          Exit For

       End If         

 

 Next



I am not able to use the same script for FF, I had to change it as given below, to get list of hyper links. But link.Click is giving VBScript error (method not available). But in object browser I could see 'Click' method under Actions section. But when I see variable 'link' in Evaluate-Inspect option, I could see only Firefox methods only. I could not see Click method. Could you please suggest work around to come across this issue.



Also I have tried with NameMapping for this particular Link object ("xyz" link that I wanted to click) and I am able to make Click call on this object.



Thanks in advance.

Pushpa.



No RepliesBe the first to reply