11-28-2008, 10:09 PM
Hello,
I am currently beginning to use QTP and am automating simple tests.
I have to do a test on a web application, where there is a WebList with several hundreds possible choices. All of them is finishing by "- Active" or "- Inactive". The test have to choose one of these choices finishing by "- Active", no matter which one exactly. The problem is that of course the texts are changing frequently from active to inactive and vice-versa, so we cannot select one precisely and hard-code it.
For the moment I though about two possible solutions (but do not know how to implement them):
1- Use a regular expression in the .Select of the WebList. I tried by using the object repository but did not find where I can do that, so I am beginning to think it is not possible.
2- Extract all the data of the WebList in a VB structure and then test each entry, until finding one which is OK and that I will use in the .Select. I do not know if it is possible and how to do it.
Can you tell me if one of these solutions is possible, and how? Or maybe tell me another better solution!
I hope I have been clear enough,
Still
I am currently beginning to use QTP and am automating simple tests.
I have to do a test on a web application, where there is a WebList with several hundreds possible choices. All of them is finishing by "- Active" or "- Inactive". The test have to choose one of these choices finishing by "- Active", no matter which one exactly. The problem is that of course the texts are changing frequently from active to inactive and vice-versa, so we cannot select one precisely and hard-code it.
For the moment I though about two possible solutions (but do not know how to implement them):
1- Use a regular expression in the .Select of the WebList. I tried by using the object repository but did not find where I can do that, so I am beginning to think it is not possible.
2- Extract all the data of the WebList in a VB structure and then test each entry, until finding one which is OK and that I will use in the .Select. I do not know if it is possible and how to do it.
Can you tell me if one of these solutions is possible, and how? Or maybe tell me another better solution!
I hope I have been clear enough,
Still