Search code examples
qtphp-uft

How to deal with following scenario in QTP?


Login page taking a Email Id and Password. After login there is Logout option is as follows:

enter image description here

Here user's first name is displaying. So now QTP is generates the script as below,

enter image description here

now when I am login from different Email Id and Password at that time how to check the first name is valid or not??


Solution

  • There are two different things here:

    1. The name of the object being NikunjN, just rename the object (in the object repository) to something generic (UserName). The name (known as "logical name") of an object doesn't effect the test run.
    2. The object's description, you don't show the object's description here, it probably includes the user name and this will be a problem. You need to inspect the object (using UFT's "object spy") and see what properties you can use which don't change between users.