How to write the script to check the properties of OK button in 10 different forms?Hello friends,If I have 10 forms where in each form consists of OK button.Now i want to test the Properties of OK button in all the 10 forms,like the x coordinate,y coordinate,width,height,text etc.can anyone tell me how to write the script for this.Itries to run by writing the script but i am getting the same value for all the OK buttons even though there are some differences.The script is considering all the OK buttons as same(that means it is always treating all the forms as same)Thanx in advanceRegardsMurali

Showing Answers 1 - 8 of 8 Answers

Eshwar

  • Aug 23rd, 2006
 

Why dont you try it with indexes.  Just add an index property and Run with for loop

  Was this answer useful?  Yes

Yogesh

  • Aug 29th, 2006
 

QTP Identify object using mendetory and assertive property. If you need to Identify OK button diffrently, first findout the the Obejct property of the OK button using Object spy and then add the property as mendetory property that is not common to all OK button. It is not good idea to use diffrent value. It's good to use same ok button for entire application. so U can use recorded line by copy/paste. use shared repository..

  Was this answer useful?  Yes

Kaivalya

  • Dec 19th, 2006
 

Hi,

If you have added all the OK buttons in object repository then check the heirarchy of all of them. They should be under different forms and all the forms should have different properties. If the forms have different properties ex. Title then you can add 10 different statements. But according to output u r getting it seems that it is checking the properties of only one OK button all the times..

Then you can use index property in descriptive programming and go to next page and then check the properties.

  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