Micro Focus QTP (UFT) Forums
Validating a search that uses wildcard - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Validating a search that uses wildcard (/Thread-Validating-a-search-that-uses-wildcard)



Validating a search that uses wildcard - praveendasika - 08-24-2012

Hi ,
I want to validate a search that retrieves me a records.
I use the '*' in the search box to retrieve records that populate a grid.

The question is how do I validate that the search worked ?

I couldnt use the count as the records keep updating.I need a way that will tell me that the search using the wild card worked.any ideas ?


RE: Validating a search that uses wildcard - karthi2v - 08-24-2012

Capture the object location where the search results will be returned, before doing a search. Then do a search using wild card. Now your results will be returned as a grid. Try to highlight the object which you have captured before doing the search. If it is not being highlighted then your search returned some values.


RE: Validating a search that uses wildcard - praveendasika - 08-24-2012

Hi Unfotunately , I cant capture the grid without records.is there any other way ?

How do I validate that the records were returned ? and if there is no data in the database and on using the wild card , if it returns no rows.I need to validate that the search returned no rows


How do i do that ?


RE: Validating a search that uses wildcard - Ankesh - 08-24-2012

@praveendasika

You can capture the grid without records. All you have to do is use On error resume next and try to select the first row.
Chk if there was ny error, an error implies there were no records in the grid.

Plz post a brief description of what are you trying to achive and wht issue r u facing for better solution?

Regards,
Ankesh