10-22-2014, 06:11 PM
Hi All
I am new to QTP and working on automating my application. i have a search box and search button on my web page. The condition for Search text is entered text should be min 3 characters. any thing less than three should show error message " abcdef"
-> Now for identification of search box i wrote below statement for to enter input
-> for search action i wrote
now when i run the app it is working as expected
Now i am validating the error message and entered less than 3 and got error message which is as expected and good.
now comes the problem
when i try to enter more than 3 characters and run the app its is not recognizing the search object when the error message is still on the page
i again identified the search box with error message on the page.
now the webtable name has been changed to
that means every time when i run the application i have to make sure that there is no error message on my page and run my current code if i don't do that then i my search box is not being recognized
can any one please let me know how to handle the situation
I am new to QTP and working on automating my application. i have a search box and search button on my web page. The condition for Search text is entered text should be min 3 characters. any thing less than three should show error message " abcdef"
-> Now for identification of search box i wrote below statement for to enter input
Code:
Browser("xyz").Page("xyz").Webtable("xyz").WebEdit("abc").Set "Value"
-> for search action i wrote
Code:
Browser("xyz").Page("xyz").Webtable("xyz").Image("img").click
now when i run the app it is working as expected
Now i am validating the error message and entered less than 3 and got error message which is as expected and good.
now comes the problem
when i try to enter more than 3 characters and run the app its is not recognizing the search object when the error message is still on the page
i again identified the search box with error message on the page.
now the webtable name has been changed to
Code:
Browser("xyz").Page("xyz").Webtable("xyz abcefg").WebEdit("abc")
that means every time when i run the application i have to make sure that there is no error message on my page and run my current code if i don't do that then i my search box is not being recognized
can any one please let me know how to handle the situation