Object name is changing while executing test in QTP

When i am recording in QTP the object name of the text box is text1 and it is changing while i am executing. whenever i am opening the login window it is assigning new names If it is like this how can i test the application

Editorial / Best Answer

b.sainarayanarao  

  • Member Since Oct-2007 | Oct 23rd, 2007


go to Resources menu-Object Repository-select the particular text object in left window pane. In right window pane select attached text column field value, a browse icon ('<#>') becomes visible and  click on  it and  select  Regular  expression  checkbox (click on 'No' option in a appeared dialogbox) and  exactly in the place  of  1  write  as  [0-9]*  
example: text 1           'before  replacement
                text [0-9]*    'after replacement  is valid
                text[0-9]*    'after replacement  is not valid because no space in between text and regular expression

Showing Answers 1 - 4 of 4 Answers

shreyas

  • Jun 27th, 2006
 

Hi

You can test the window by using regular expression.

  Was this answer useful?  Yes

go to Resources menu-Object Repository-select the particular text object in left window pane. In right window pane select attached text column field value, a browse icon ('<#>') becomes visible and  click on  it and  select  Regular  expression  checkbox (click on 'No' option in a appeared dialogbox) and  exactly in the place  of  1  write  as  [0-9]*  
example: text 1           'before  replacement
                text [0-9]*    'after replacement  is valid
                text[0-9]*    'after replacement  is not valid because no space in between text and regular expression

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions