Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic change of name for Webtables
#1
Not Solved
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
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
Reply
#2
Not Solved
Option 1: check for the property of the table which does not changes based on the error message condition and use the same in your code/OR
Option 2: Use the pipe symbol and provide both the property values (withoutErrMsg|withErrMsg)

Let me know if you need any more help
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you Change Run mode mid script? Caleytown 6 7,234 03-25-2021, 08:27 AM
Last Post: RB26578
  [UFT] Change property of object (WpfButton) robertosalemi 2 2,628 11-22-2016, 12:43 PM
Last Post: Ankur
  How can I change my test folders, globally? atester 0 2,029 10-03-2014, 04:37 PM
Last Post: atester
  JavaDialog change every time i run my test Pkapoor 3 2,996 06-28-2013, 09:27 PM
Last Post: Ankur
  How can change object logical name dynamically? kamal262007 0 2,281 10-17-2012, 08:56 AM
Last Post: kamal262007

Forum Jump:


Users browsing this thread: 2 Guest(s)