QTP text check
Here is the scenario that I am working with and is giving me problem.
I am adding a task to my web based application and that task gets added up into a popup box where I can select the added task and move it to top or bottom where ever I want.
When I am recording this particular event the following statement is displayed in my script:-
Browser("abcd").Page("abcde").WebList("select").Se lect "#25"
but its is not necessary that the added object is always in this number.
so when I run my script I get an error asking me to check the object exist on that specified place.
Re: QTP text check
Use getROProperty("items count") to get the total count.
x = CInt(Browser("abcd").Page("abcde").WebList("select ").GetROProperty("items count"))
Browser("abcd").Page("abcde").WebList("select").Se lect "#" & (x-1)