I am facing one problem in identifying the link in web page. Lets take one example...there is 2 web link called Compose. One link is present in the Home page itself and another one is present under Update menu... When I try to click the link present under the Update menu QTP is clicking the Compose link which is present in Home page.
This is the code I tried to click the second menu.
Experts plz advice.....and also plz tell me what are all mandatory property to use while coding to identify the object properly..Lets take Index is the extra property I used to click the Link...
Seems to me that it should work the way you wrote it. Are you sure the link you want is index 1? Try changing to index 0 and see if it clicks the other link. Sometimes my devs surprise me at how they write their code to build their windows/pages.
"The last 10% of any software project will take 90% of the budgeted time. The first 90% will take the other 90%"
Click on both links with the Spy Tool in QTP. See if there are any differences in the Test Object Properties between the two links objects.
Then record clicking on both links, make sure there are two objects for the two links in your Object Repository (OR).
Open your OR and click on the link object. Click on the + to "Add Desription Properties" and then add the properties that are different between these two links.
Then open the webpage to where each link is. In the OR click on the link object and click the "Highlight in Application" icon. This will tell you for sure if you set each link object correctly and uniquely.
If that doesn't work, then try using Descriptive Programming (DP).
Thanks for your valuable inputs...And coming to the topic I am not using the OR for my project....I am doing Descriptive programming....but still let me try with your input first if any properties are vary with these objects...