Micro Focus QTP (UFT) Forums
Clicking a link in a web table - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Clicking a link in a web table (/Thread-Clicking-a-link-in-a-web-table)



Clicking a link in a web table - Brian T. - 07-13-2010

New Problem I'm working with a web base application, and within my application you can click various links throughout the application.

I have one link that is in a web table row count 2 of a pop up page....the (innertext, innerHTML) is Close.

The link on this page is the only link available on the page and the page is a sub page of another page....so the viewable page is smaller then the main screen.

I attempted to record this function...but when I run the script it fails at that step.

I do have an object repository setup for this specific page and it is associated with the test.

When I use object spy it list WeTABLE and Link : Close

I have now idea why it will not click the close ...link button.

Thanks,
Brian


RE: Clicking a link in a web table - sasmitakumari - 07-13-2010

Hi,
Can you provide, snapshot of the web table, and your OR with focusing your link object and the lines of code to click on the link that you got after recording?


RE: Clicking a link in a web table - Brian T. - 07-13-2010

Thanks For the reply...

I have provided 4 attachments for the OR, Object Spy, and the screen shot of the web table I'm trying to access with the source code.

I'm trying to click on the Close link.

Here is the code when I record the function.

Code:
Browser("Access Provisioning Request").Page("Access Provisioning Request_3").Check CheckPoint("Access Provisioning Request System_6")

Here is the code if I add it manually.

Code:
Browser("Access Provisioning Request").Page("Approvers For Request").WebTable("Approvers For The Request").Click("Close")

When the test stops and I add the code the code manually and rerun the test it will perform successfully, but if I try to rerun it it fails again.

...The screen shots were too large to add as attachment so I ZIPED them and attached the ZIP let me know if you were able to see them....


RE: Clicking a link in a web table - sasmitakumari - 07-13-2010

Try This:

Code:
Set Desc = Description.Create()
Desc("Class Name").Value = "Link"
Desc("Text").Value = "Close"
Desc("class").Value = "Button"
Browser("Access Provisioning Request").Page("Approvers For Request").WebTable("Approvers For The Request").Click(Desc)



RE: Clicking a link in a web table - sreekanth chilam - 07-13-2010

Hi Sasmita,

Suggest you to Wrap up the code using "Insert Formatted Code" feature while posting Smile


RE: Clicking a link in a web table - Brian T. - 07-14-2010

Thanks For the help....I tried the code but I'm receiving a Type Mismatch error.

Type mismatch: 'Browser(...).Page(...).WebTable(...).Click'


RE: Clicking a link in a web table - David Eng - 10-21-2010

Try changing the last line (from the above codes) to:
Code:
Browser("Access Provisioning Request").Page("Approvers For Request").Link(Desc).Click



RE: Clicking a link in a web table - vinod123 - 01-02-2012

Just Try this if it is not working just try another property of link and its value. just do not get confused
Code:
Browser("micclass:=Browser").Page("micclass:=Page").Link("text:=Close").click