Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to click on all links dynamically in UFT?
#1
Solved: 7 Years, 7 Months, 1 Week ago
Hi all,
i have written a script which will click on all the links in a page. the script is working fine for the first iteration while it is trying to click the second link in the page, a General Run Error is occurred. Go through the following script and correct me, suggest me.
Thanks.

Code:
set Links = Description.Create()
Links("micclass").Value = "Link"
set objLinks = Browser( "Google").Page( "Google").ChildObjects(Links)
LinkCount = objLinks.Count
msgbox LinkCount

For i = 1 To LinkCount-1
     objLinks(i).Click

Set obj1= createobject("wscript.shell")// Iam using this to navigate to
obj1.sendkeys "{TAB}"                     //previous page..
obj1.sendkeys "{BS}"
Next
Reply


Messages In This Thread
How to click on all links dynamically in UFT? - by Rohan - 04-14-2011, 09:15 AM
RE: click on all links dynamically.. - by Jay - 04-14-2011, 11:07 AM
RE: click on all links dynamically.. - by Rohan - 04-14-2011, 11:57 AM
click on all links dynamically.. - by Rohan - 04-14-2011, 01:18 PM
RE: click on all links dynamically.. - by Jay - 04-27-2011, 01:56 PM
RE: click on all links dynamically.. - by sindhus - 02-22-2016, 12:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to dynamically find the OracleFormWindow? arpan 0 1,506 04-26-2017, 12:45 AM
Last Post: arpan
Exclamation UFT doesn't recognize object in SAP at first, but recognize it after i click debug CedricMab 3 6,416 02-06-2017, 07:09 PM
Last Post: nguyen4685
  I want to click on all the links in the webtable. These links are nothing but some co abhideshpande001 0 2,573 07-22-2015, 09:36 AM
Last Post: abhideshpande001
  How to Verify Static Object Text which is changing Dynamically with Expected Result johnny77 0 3,187 06-25-2015, 11:32 AM
Last Post: johnny77
  SAPGuiSession get the active SAPGuiWindow dynamically cko77 2 5,144 01-27-2014, 12:04 PM
Last Post: cko77

Forum Jump:


Users browsing this thread: 1 Guest(s)