Micro Focus QTP (UFT) Forums
checking fro search result - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: checking fro search result (/Thread-checking-fro-search-result)



checking fro search result - bavnah - 07-08-2009

Hi All,

I am trying to check if my web page returns my search result successfully.
How do i check for this, can anyone help. and also to check for the relevance of the search result using qtp.

Thanks all in advance


RE: checking fro search result - basanth27 - 07-08-2009

What are you trying to search ??

Even before you use QTP you need to understand that there will be a logic and you will need to code around it. For every action there will be a reaction. For Eg : If you enter a name and click on Search it will respond with all the names matching the search text.

Let us know your criteria and then possibly we can help you out.


RE: checking fro search result - laura - 07-08-2009

I want to search for anything. I just want to check that the search functionality works on the web site am testing.
The testcase i want to automate says - 'Ensure search functionality works on site'
so really i should be able to type anything into the search box on the site and expect qtp to let me know the search results were displayed.

e.g. Type people in the search box and it should return all the instances of within the search results.

Thanks


RE: checking fro search result - QTPian - 07-13-2009

Hi,

Create ado objects for database and recordset. Write the query(Probably, your requirement seems like "Like" search) and check for every value of your recordset matches the application's output.

Thanks,


RE: checking fro search result - KVK - 07-13-2009

Hi,

By using child objects you can verify the results...

For example :
Lets take the google as an example.
When I search some thing on google, the search results are displayed as links. So we can get all the links displayed as search results in the webpage and get the inner text of each link and instring that with the string that we searched for.

Let me know if this works for you..
- Mr. K


RE: checking fro search result - bavnah - 07-14-2009

Hi Mr K can you explain a bit more, is this going to be like a loop or something.

And can i check if they are all word documents dispalyed

Thanks for your help


RE: checking fro search result - KVK - 07-14-2009

Hi

On what type of application are you trying to search. On web application?

Please explain your scenario with screen shot is possible.


RE: checking fro search result - laura - 07-14-2009

yes please, on a web application and the search is on a page.
Thanks


RE: checking fro search result - sharingwilddreams - 07-15-2009

Laura,Searching is quite easy using QTP. I have the code for that. But i am not sure how ur page looks like. Is it a page with a Textbox to enter the searchvalue and then click to get the results? 2)What is that u want to check,like whether the Number of Records?or is it like u want to check whether all the records r active status in the DB?Tell me ur criteria,i will edit the code and post it here.