Forum Discussion

tcurry's avatar
tcurry
Occasional Contributor
14 years ago

aqObject.CheckProperty Usage

Coding the following in the script works correctly, however using the 'Call Object Method' within the Keyword Test and using it does not.  Can anyone give an explanation as well as how to alleviate the problem.



aqObject.CheckProperty(Sys.Process("IEXPLORE").Page("*").NativeWebObject.Find("id","*rfvPassword","SPAN"), "innerText", 0, "Please enter a Password");



Thanks.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Without seeing the specifics of your keyword test, I can't necessarily give you an indication as to why it doesn't work.  It's possible that one of the parameters you've passed in to the keyword test may be incorrect.



    However, probably a better way in a keyword test is to use a Property Checkpoint.  It effectively does the same thing.
  • tcurry's avatar
    tcurry
    Occasional Contributor
    I've tried to use the Property Checkpoint, however it uses the Keyword mapping to identify the object.  These objects are dynamically created so the mapping changes and breaks the Keyword test.  This is the reason I was using the NativeWebObject.  I've tried to override the use of the Keyword mapping for the Property Checkpoint, but haven't had any luck.  Any suggestions are welcomed.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    You can use the same wildcards in NameMapping to handle dynamically changing components just as you did in the Find call of NativeWebObject.



    Concerning your actual problem, are you getting any particular errors or problems in your test log?  Have you tried putting a breakpoint at that point in your keyword test and checking to see if the object itself resolves as expected?  Could you post a screenshot of what you're doing with your keyword test to show what parameters, settings, etc you've selected?
  • tcurry's avatar
    tcurry
    Occasional Contributor
    As i'm keying the input into 'Call Object Method' within the Keyword Test, I receive the attached error.  Generating the Script from the keyword test and keying in the same input works fine.  
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    If you're using call Object method, the object is aqObject by itself.



    Then, when you click the next button, you'll be prompted for the method from which you choose "CheckProperty".



    You'll then be prompted to enter in the various parameters for the method.
  • tcurry's avatar
    tcurry
    Occasional Contributor
    Following the wizard through the creation worked.  I was trying to key it all in at the very beginning and it didn't like it.  I appreciate the help.