In software testing projects, many times we come across situations where we have to perform the operation on the objects relative to other objects.
For example - in below table we have three view buttons. So to click on the view button for given emp id, you will have to first find the row number in which that emp id exists and then click on the view button in that row.
We can use HTML DOM concept to handle such situations.
We can find the TD element which contains employee id say 7777. After this, we can use nextSibling property of the TD element to get the Next TD element and then find the child object (Button) of that TD using getElementsByName method.
In windows based applications, we can use relative identifier (Supported in QTP 11.5 onwards and UFT).
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
Emp Id | Action |
---|---|
78989 | |
7777 | |
9999 |
We can use HTML DOM concept to handle such situations.
We can find the TD element which contains employee id say 7777. After this, we can use nextSibling property of the TD element to get the Next TD element and then find the child object (Button) of that TD using getElementsByName method.
In windows based applications, we can use relative identifier (Supported in QTP 11.5 onwards and UFT).
Please give your inputs, suggestions, feedback to Us about above QTP topic. We value your thoughts. You can write to me at reply2sagar@gmail.com
No comments:
Post a Comment
Please Leave your reply. We value your feedback and inputs