12-14-2011, 08:50 PM
Hi folks,
I'm a QTP beginner (surprise!). I have a trial version of QTP 11 (build 1018), and am playing around to see if it might be a valuable addition for our company. (Incidentally, the "Posting Guidelines" hyperlink in the "please read this" thread is dead, so I'm winging it here as best I can. I have gone through the QTP tutorial, and found it very helpful.)
So, I figured I would try to build a very simple test based on the login screen of our .NET windows application. It's a very simple screen with some labels, a password field, and OK/Cancel buttons. I have the .NET, Web, and WPF add-ins activated, although I confess I'm not a developer and am not 100% certain I'm doing this right. I'm running on Win 7 Pro, SP 1.
I set up a test, and used "Navigate and Learn" to create the object repository. It successfully found the objects on the screen. In my test, I tried to simply test whether or not a given label exists on the screen. I did this by selecting the "Project Code" label item and the "Exist" operation from the Keyword view. The Expert View shows this:
However, when I run the test, it immediately says, "Object doesn't support this property or method: 'SwfWindow(...).SwfLabel(...).Exist'".
When this didn't work, I tried a Click operation on one of the buttons, and that seemed to work. I've tried Googling this a bit, but haven't come across anything obvious. I was hoping that I'd have luck getting this simple test done, but so far, no love.
Can anyone point me in the right direction? I'm happy to answer any questions I can...
Thanks!
~Steve
I'm a QTP beginner (surprise!). I have a trial version of QTP 11 (build 1018), and am playing around to see if it might be a valuable addition for our company. (Incidentally, the "Posting Guidelines" hyperlink in the "please read this" thread is dead, so I'm winging it here as best I can. I have gone through the QTP tutorial, and found it very helpful.)
So, I figured I would try to build a very simple test based on the login screen of our .NET windows application. It's a very simple screen with some labels, a password field, and OK/Cancel buttons. I have the .NET, Web, and WPF add-ins activated, although I confess I'm not a developer and am not 100% certain I'm doing this right. I'm running on Win 7 Pro, SP 1.
I set up a test, and used "Navigate and Learn" to create the object repository. It successfully found the objects on the screen. In my test, I tried to simply test whether or not a given label exists on the screen. I did this by selecting the "Project Code" label item and the "Exist" operation from the Keyword view. The Expert View shows this:
Code:
SwfWindow("MyScreen").SwfLabel("Project Code:").Exist
However, when I run the test, it immediately says, "Object doesn't support this property or method: 'SwfWindow(...).SwfLabel(...).Exist'".
When this didn't work, I tried a Click operation on one of the buttons, and that seemed to work. I've tried Googling this a bit, but haven't come across anything obvious. I was hoping that I'd have luck getting this simple test done, but so far, no love.
Can anyone point me in the right direction? I'm happy to answer any questions I can...
Thanks!
~Steve