Posts: 4
Threads: 2
Joined: Jul 2009
Reputation:
0
07-08-2009, 01:23 AM
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
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
07-08-2009, 11:53 AM
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 26
Threads: 8
Joined: Jun 2009
Reputation:
0
07-08-2009, 02:34 PM
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
Posts: 44
Threads: 1
Joined: Jun 2009
Reputation:
0
07-13-2009, 04:17 PM
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,
Posts: 50
Threads: 0
Joined: Jul 2009
Reputation:
0
07-13-2009, 05:27 PM
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
Posts: 4
Threads: 2
Joined: Jul 2009
Reputation:
0
07-14-2009, 01:34 AM
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
Posts: 50
Threads: 0
Joined: Jul 2009
Reputation:
0
07-14-2009, 08:47 AM
Hi
On what type of application are you trying to search. On web application?
Please explain your scenario with screen shot is possible.
Posts: 26
Threads: 8
Joined: Jun 2009
Reputation:
0
07-14-2009, 02:26 PM
yes please, on a web application and the search is on a page.
Thanks
Posts: 4
Threads: 1
Joined: Jul 2009
Reputation:
0
07-15-2009, 04:37 PM
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.