Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple problem-unable to trace a button on form
#1
Solved: 10 Years, 9 Months, 1 Week ago
hi guys,

I'm beginner to QTP and in the learning process. I'm having a problem on testing an application.

It is very simple. I created an application with a form and add a button(in vb). The button's purpose is just to close the application. The button's name is buttonExit.

I'm able to learn(Object Repository Manager) the application to obtain the objects available in the form. Then i created a very simple script to run the application and close it, as below:

Code:
Window("Form1").Activate
wait(10)
Window("Form1").WinObject("Exit").Click

I guess the script was not wrong.

Error message upon executing the last code:

"Cannot identify the object "Exit" (of class WinObject"). Verify that this object's properties match an object currently displayed in your apllication"

Do you guys have any idea?

Thanks.
Reply
#2
Solved: 10 Years, 9 Months, 1 Week ago
Hi,
U should be careful while learning the objects.
1)Did ur OR learn the Object with option all objects present in the window.
2)if this does not solve ur problem try to learn the object again.
Code:
if  dialog("abc").winbutton("xyz").exist then
msgbox "yes"
else
msgbox "no"
end if
this should resolve ur issue
regards,
Amit
9773539313
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can we test Salesforce Standard form using QTP? yona34 0 943 05-22-2018, 10:57 AM
Last Post: yona34
Question Strange form, cant get it marvson 0 1,349 05-12-2016, 07:35 PM
Last Post: marvson
  How to pass a date from Excel sheet to web form revati.shendure 1 2,820 11-27-2014, 11:54 AM
Last Post: revati.shendure
  Unable to Click on Login Button Paurav 1 3,161 07-03-2014, 05:27 AM
Last Post: supputuri
  Form testing with UFT12 renukant@gmail.com 3 2,984 05-23-2014, 04:09 PM
Last Post: excellentpawan123

Forum Jump:


Users browsing this thread: 1 Guest(s)