Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
To get Link names randomly and to click..
#1
Solved: 11 Years, 2 Months, 4 Weeks ago
Hi

I have an web application, In that i have two tabs in each tab have nearly 100 links,
Every time i want to click on the links randomly to to open other page.

Firstly i used description object to get the count of the links.. but i didn't get the next

Can any one please give me the reply.. do i need a java-add in for this ?
While i spy on the objects i see the class as web-Element... Can't we do this wit out java add-in ??


Thanks in advance
-Ram
Reply
#2
Solved: 11 Years, 2 Months, 4 Weeks ago
I guess, the links which you say are actually WebElements, i dont think you need java add-in.
Can you attach the spyshot and the code whatever you tried?

Reply
#3
Solved: 11 Years, 2 Months, 4 Weeks ago
The below code has given me the total links count in the browser

Code:
Set oDesc = Description.Create()
oDesc("micclass").Value = "Link"
Set Links = Browser("Sample").Page("SamplePage").ChildObjects(oDesc)
Msgbox "Total links: " & Links.Count

See the attache ss

Thanks
-Ram


Attached Files Image(s)
   
Reply
#4
Solved: 11 Years, 2 Months, 4 Weeks ago
change the value of micclass to WebElement, as the object is webelement per spyshot.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to test if application logout randomly ab4abhisek 1 1,479 09-25-2018, 03:11 PM
Last Post: Ankur
  How to click on link available in excel file vikrant 1 2,413 02-15-2014, 12:51 PM
Last Post: vinod123
  IE Error occurs randomly while running from QC from different machine likit143 2 4,334 10-27-2011, 10:55 AM
Last Post: ravi.gajul
  "Reply error" randomly appears in Quality Center while running QTP scripts from there alhifizik 0 3,441 07-21-2011, 06:26 PM
Last Post: alhifizik

Forum Jump:


Users browsing this thread: 1 Guest(s)