Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Link which opens in new window Help
#1
Question 
Hi,

I want to automate clicking on a dynamic link(Comments) which opens a new browser window...For some reason even though QTP recognizes the object, it doesn't open the comments in a new window

Here's the code:
Code:
' Create description for all Links on a Web page. ' For that we use "html tag" property and its value "A" Set descLink = Description.Create descLink("html tag").value = "A" descLink("text").value= "0 Comments" ' Get all Links which match the above description Set listLinks = Browser("abcd").Page("abcd").ChildObjects(descLink) While (listLinks.Count =0) wait(3) Browser("abcd").Refresh Wend If (listLinks.Count =1) Then wait(4) If (listLinks(0).exist) Then listLinks(0).Click End If End If
Reply
#2
Hi,

I do not see any code for entering the comments.

Code:
If (listLinks(0).exist) Then [b]Browser("abcd").Page("pqrs").listLinks.set "xyza"[/b] listLinks(0).Click End If
Reply
#3
Huh? It's a link in a browser page and I want to click on it - Which should result in a new window being opened but it's not happening

To be clear, "0 comments" is a an object of class Link
Reply
#4
Hi,
Can u plz do a object spy on the link and share us the snapshot. And also try

Msgbox listLinks(0).exist

see whether u r getting a message as True.
Reply
#5
hi,

Could you please try the below description for weblink

Code:
Set descLink = Description.Create descLink("micclass").value = "Link" descLink("text").value= "0 Comments"

Regards,
Parminder
Reply
#6
Reply
#7
Hi,

Before listLinks(0).Click
Put listLinks(0).Highlight and observer whether your link is getting higlighted or not, If yes Check is there something blocking your new window/popup.

Thanks,
Suresh.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object doesn't support this property or method: 'window(...).window(...).winobject' senthil5683 1 4,151 07-04-2016, 07:08 PM
Last Post: venkatesh9032
  How to click on a dynamic link on a website Geekgirl 3 5,260 11-28-2013, 11:53 AM
Last Post: Jay
  Dynamic variable in link call rdix007 1 3,237 03-28-2013, 07:02 AM
Last Post: basanth27
  To Delete Dynamic Link Present in a WebTable sheikadil15 0 2,678 04-16-2011, 12:54 PM
Last Post: sheikadil15
  Link to a file in the test result window tennessee 0 2,312 01-24-2011, 07:31 PM
Last Post: tennessee

Forum Jump:


Users browsing this thread: 1 Guest(s)