Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP - Code to select a link
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Your expectation is to click on a link available in a page that takes you to the next page.

so, the object that you are accessing is link and the method you have to invoke is click

Step1: Set Mandatory properties for browser, page and link if not already set. (ex. for browser set as name, for page set as title and for link set as name)
Step2: Add all the three objects(browser, page and link) to object repository using Add Objects.
Step3: write code to invoke the the application like

"SystemUtil.run "http://www.google.co.in"

Step4: write code to click on the link

Code:
Browser("name:=Google").Page("title:=Google").link("name:=linkname").click
this should work.

Regards,
Prabhu K
Reply


Messages In This Thread
QTP - Code to select a link - by Unleash Rajesh - 06-21-2011, 05:10 PM
RE: QTP - Code to select a link - by shivu.hanu - 01-03-2012, 05:53 PM
RE: QTP - Code to select a link - by prabhukrishna - 01-03-2012, 06:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how to select value from google search box dropdown +QTP prajyot 0 2,897 06-28-2017, 06:30 PM
Last Post: prajyot
  how to randomly Select any category link and randomly click on one of its options ? sharavan 0 2,927 11-18-2014, 12:24 AM
Last Post: sharavan
  Date Picker Issue - Unable to select date link dynamically rajkumarsm 1 5,162 09-20-2014, 09:31 AM
Last Post: rajkumarsm
  Do you think it professional QTP code ? learnqtp 0 2,951 06-21-2012, 03:48 AM
Last Post: learnqtp
  Output is different from two different machines for the same block of code in QTP. bdash_10 0 2,074 04-13-2012, 03:38 PM
Last Post: bdash_10

Forum Jump:


Users browsing this thread: 1 Guest(s)