Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clicking a link in a web table
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
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
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
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?
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
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....


Attached Files
.txt   Web Table HTML.txt (Size: 2.63 KB / Downloads: 98)
.zip   QTP Screen Shots.ZIP (Size: 58.38 KB / Downloads: 104)
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
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)
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi Sasmita,

Suggest you to Wrap up the code using "Insert Formatted Code" feature while posting Smile
Reply
#6
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks For the help....I tried the code but I'm receiving a Type Mismatch error.

Type mismatch: 'Browser(...).Page(...).WebTable(...).Click'
Reply
#7
Solved: 11 Years, 4 Months, 3 Weeks ago
Try changing the last line (from the above codes) to:
Code:
Browser("Access Provisioning Request").Page("Approvers For Request").Link(Desc).Click
Reply
#8
Solved: 11 Years, 4 Months, 3 Weeks ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,820 04-29-2017, 04:53 PM
Last Post: kowshik
  Winbutton slow in clicking kpat 0 1,848 05-23-2016, 12:09 PM
Last Post: kpat
  Clicking on sublink venkatesh9032 1 2,805 06-01-2015, 08:26 PM
Last Post: babu123
  Updating the web table Ananth1982 0 1,922 03-04-2015, 02:31 AM
Last Post: Ananth1982
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 11,458 07-09-2014, 10:43 PM
Last Post: hhamilton

Forum Jump:


Users browsing this thread: 6 Guest(s)