I am relatively new to QTP and I am still getting used to it.
One question that I have is about selecting a link in a WebTable. Each
time I come to the page in question, the WebTable contains a different
named link at the top of the table (due to the search criteria used).
However, I want to be able to record a QTP script that enables it to
select this first link every time regardless of wheather the name of
the link changes.
Does anyone know how QTP can do this?
I would appreciate any assistance.
Regards,
Lee
Dmitry Motevich,
I'm looking for online/remote job - $0.01/hour
No joking!
-Shirish
Try ThisSet WebLinkObj = Browser("XXX").Page("YYY").WebTable( "WebTableName").ChildItem(RwID, ColID, "Link", 0)
WebLinkObj .Click
Thanks for this code.
However, when I run my script in this format (I have added in all the
variables), I get the following Run error:
"Object required: 'WebEditObj'"
Do you know how I could fix this?
Regards,
Lee
On Jun 25, 8:42 pm, "Shirish K" <shirish1...@gmail.com> wrote:
> Try This
>
> *Set WebEditObj =
> Browser("XXX").Page("YYY").WebTable("WebTableName").ChildItem(RwID,
> ColID, "Link", 0)
> WebEditObj.Click*
>
> -Shirish
> On 6/25/07, Lee <lee....@macquarie.com> wrote:
>
>
>
>
>
> > Hi,
>
> > I am relatively new to QTP and I am still getting used to it.
>
> > One question that I have is about selecting a link in a WebTable. Each
> > time I come to the page in question, the WebTable contains a different
> > named link at the top of the table (due to the search criteria used).
> > However, I want to be able to record a QTP script that enables it to
> > select this first link every time regardless of wheather the name of
> > the link changes.
>
> > Does anyone know how QTP can do this?
>
> > I would appreciate any assistance.
>
> > Regards,
> > Lee- Hide quoted text -
>
> - Show quoted text -
Thanks for the information.
However, I now get the following Run error:
"Object required: 'WebLinkObj'"
Following is the code that I used:
Set WebLinkObj = Browser("XXX").Page("YYY").WebTable("Account
name").ChildItem(1, 1, "Link", 0)
WebLinkObj.Click
Question - You talk about giving a name for the Object. Is this done
in the above code? If not, what else would I have to do?
Regards,
Lee
On Jun 26, 10:33 pm, "Shirish K" <shirish1...@gmail.com> wrote:
> Actually it should not "*WebEditObj*" replace it with "*WebLinkObj*" as per
> my first mail following is my comments.
>
> 'Following line of code sets the Object as LinkObject which you want to
> click
> *Set WebLinkObj
> = Browser("XXX").Page("YYY").WebTable("WebTableName").ChildItem(RwID, ColID,
> "Link", 0)*
> 'Here the Click operation performed on that link
> * WebLinkObj.Click*
>
> Make sure you give same name for the Object and in click operation.
> Also make sure the Class of the Link in you application is "Link" or
> "Weblink" and modify the child item class
>
> Let me know if u need more help on this.
>
> If same issue then paste your code here to look at that.
>
> -Shirish
>
> > > - Show quoted text -- Hide quoted text -