Micro Focus QTP (UFT) Forums
JavaDialog change every time i run my test - 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: JavaDialog change every time i run my test (/Thread-JavaDialog-change-every-time-i-run-my-test)



JavaDialog change every time i run my test - Pkapoor - 06-28-2013

Hello ,
I have a question, please look at my code below:
Code:
JavaWindow(“ABC”).JavaDialog(“Add”).JavaEdit(“JTextArea”).Set(“123″)
When i run my code … JavaDialog change every time from and expects different code each time and i have to change code to any of following:
Code:
JavaWindow(“ABC”).JavaDialog(“Add”).JavaEdit(“JTextArea”).Set(“123″)
OR
Code:
JavaWindow(“ABC”).JavaDialog(“Add_2″).JavaEdit(“JTextArea”).Set(“123″)
JavaWindow(“ABC”).JavaDialog(“Add_3″).JavaEdit(“JTextArea”).Set(“123″)

why does it change every time. how can i write a code that run every time without changing anything?


RE: JavaDialog change every time i run my test - Ankur - 06-28-2013

Under Toos > Options > General tab,
Java test object description , change the radio button to "Different test object descriptions"


RE: JavaDialog change every time i run my test - Pkapoor - 06-28-2013

Thanks Ankur ,
this was my first post and such a quick response .. thanks!
i will try to put code in [code] tag.

Can you please also explain how this radio button changed the setting?


RE: JavaDialog change every time i run my test - Ankur - 06-28-2013

With this option, It is recording the new logical name only when the object properties are different.