Clicking Different Links on a WebPage UFT 12.50

Hi All

I just cannot get passed this issue im having. When creating automated scripts for a Web Application.

1.) Basically a password reset script.

2.) Using Parameterisation for users profiles

3.) And an output checkpoint for the users new username and password

So when the scripts runs through the iterations, some users profile is on the first link to be clicked, some on the second link and a on the third link. Below is an example of how the three links are recognised by UFT:

'Browser("My Browser").Page("My Page").Frame("My Frame").Link(">>").Click
'Browser("My Browser").Page("My Page").Frame("My Frame").Link(">>_2").Click
'Browser("My Browser").Page("My Page").Frame("My Frame").Link(">>_3").Click

The issue im having is when the script is running, User 1 has to activate the first link and User 2 would have to activate the second link. As some users has more that one profile, it has to select the correct profile to activate.

There is unique values on the page which is the username, i have tried "exist" operation, but now i need to activate that line. The unique value is on the left of the screen and the line activation link is on the right. So basically its finding the unique value. Now i need to activate that line.

I hope someone can help please.

Parents
  • Hi Shuaib,

     

    Have you tried using a visual relation identifier ? 

    Basically, you should add both objects in the Object Repository (the one with the unique attribute value (let's call it A) and the one that has to be clicked in order to activate the line (B)), and then add a visual relation identifier for B. If A and B are somehow related you could easily identify B by specifying it's relative position to A with one of the following options :

    _ Left/Right with an in line (horizontally) option;

    - Above/Below with an in line (vertically) option;

    - Closest on the X-axis/Closest on the Y-axis/Closest on both axes/Contains.

     

     

    Hope this helps,

    Mihai.

Reply
  • Hi Shuaib,

     

    Have you tried using a visual relation identifier ? 

    Basically, you should add both objects in the Object Repository (the one with the unique attribute value (let's call it A) and the one that has to be clicked in order to activate the line (B)), and then add a visual relation identifier for B. If A and B are somehow related you could easily identify B by specifying it's relative position to A with one of the following options :

    _ Left/Right with an in line (horizontally) option;

    - Above/Below with an in line (vertically) option;

    - Closest on the X-axis/Closest on the Y-axis/Closest on both axes/Contains.

     

     

    Hope this helps,

    Mihai.

Children