Micro Focus QTP (UFT) Forums
Dialog Boxes - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Dialog Boxes (/Thread-Dialog-Boxes)



Dialog Boxes - mv8167 - 07-06-2011

My company recently changed Dialog boxes names from (i.e.)
Code:
Dialog(“File Download”). Dialog(Save As”).WinButton(“Yes”)
Now reads:
Code:
Dialog(“0% of Results.aspxfrom”). Dialog(Save As”).WinButton(“Yes”)

How can I get QTP to look for “File Download” when it sees “0% of Results.aspxfrom”?


RE: Dialog Boxes - tdevick - 07-06-2011

It sounds like it's the same object with a different name. If so, you should be able to go into the repository, find the "File Download" dialog object, and look at the attributes of the object - usually either the "innertext" or "text" attribute will be set to the text shown in the dialog box. Just change the text to match the new dialog text and that should fix the problem.


RE: Dialog Boxes - rajpes - 07-06-2011

Go to Object repos,
Highlight the dialog box,
Click on Object>Update from application.
Choose corresponding object.It will overwrite the existing properties.

If you have lot of such dialog boxes and feel it to be cumbersome to do it manually for each of them,

Write old and new values to the global sheet,
iterate a small script using GetTOProperty and SetTOProperty To update the required property

Another way would be to use 'Find and Replace' tool in Object repos(Edit).
But this is useful only if all dialog boxes will share common replaceable property which is very unlikely.But it will definitely ease you to navigate to all dialog boxes one by one by clicking 'next' and editing its property in 'test object details' when you chose to do it manually.


RE: Dialog Boxes - mv8167 - 07-09-2011

Thx guys for the info. ;-)

QTP never saw this name until now. I checked with the developers and nothing was changed on this dialog box. I had this name all over so I know I used it many times before. The code is thec same in Prod so I know there were no changes made.

I went through as suggested and everything works now. Just dont know why QTP saw it one way now another.

thx guys


RE: Dialog Boxes - rajpes - 07-09-2011

That happens sometimes in some run Lorena


RE: Dialog Boxes - mv8167 - 07-11-2011

Raj, thx, but this Only happens on one machine. Ever since I updated Acrobat to 9.4. But this dosent happen otherwise on my second machine. Off rto do compatibuility research.

thx ;-)