Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can check for enabled/disabled LINK

Status
Not open for further replies.

Colliers

Technical User
Jan 11, 2008
7
CA
Hi,

Is there a way to check if a link is enabled or disabled.
Issue on hand is depending on user rights, links on the page are enabled or disabled.

I want to record script once against a user and be able to iteratively run it with a number of users having different rights and confirm the specific links are enabled/disabled, depending upon the user logged in.

One way I found is to do a Page Checkpoint and Filter Link Check but the problem is that this list only contains links that were enabled when the recording was done -- all disabled links do not show up in the list and also not sure how to configure it per user permissions to veriy link is not accessible.
 
Hi. The shortest route to tackle this one is to record your script using a user where all links are available, clicking each in turn.

Now you have a script for one situation, the one where an admin has access to all links.

Running this for multiple user types will disable some links, so trap the result of clicking each link and store it in an array. one you exit the links list, with an array of success/failures, compare the array of results to an expected set of results for the usertype the script ran with.

This will let you see easily if the links are disabling as expected for each usertype.

Cheers,
Dave

"Yes, I'll stop finding bugs in the software - as soon as you stop writing bugs into the software." <-- Me

For all your testing needs: Forum1393
 
Hi,

Thanks for the reply, but could you elaborate on how to get results from clicking on links. is there a way without having to do a lot of coding -- since these will be maintained by people without any coding experience + we are currently short on time.

Also just to add more details to my initial questions. when a user not having permissions to the link logs its just recognized as TEXT by QTP and not a with no HREF tags....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top