Forum Discussion

Gaya's avatar
Gaya
Occasional Contributor
5 years ago
Solved

aqObject.CheckProperty- (checkpoint on Content text) Control does not go to else condition

Hi,   Is there anything wrong with below code? Control is not going to Else conditon even if the If condition is not true. It just evalutes If condition and throws an error.     Note: Object ...
  • RUDOLF_BOTHMA's avatar
    5 years ago

    I'd Expect so, yes.  

     

    A cleaner way of comparing though would probably be

    var doesCompare = aqstring.Compare(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4.contentText,"Order Placed",false);

    if(deosCompare==0)
    {
    ...
    }
    else
    {
    ...
    }

    since contentText is a property of a TC object.

     

    When you are doing the check, are you sure the contentText has changed e.g. what does Log(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4.contentText) tell you at each step of the process ?

     

    If it' not what you see on the screen, you may be able to Refresh mapping info