Showing results for 
Search instead for 
Did you mean: 

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

Occasional Contributor

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

Thanks for your input :-)I tried comparing directly as you mentioned in the example. nothing seemed to work. I used switch case too.


It just skipped the if statement during execution


I am new to TestComplete, Below options I tried before posting my question here.


I will try the CompareProperty option and update you


//Option 1 (Checkpoint evailated to False error)
if((aqObject.CheckProperty(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4, "contentText", cmpEqual, "Order accepted", false))==true){
Log.Message("Order Accepted")
if(aqObject.CheckProperty(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4.textnodeLabelLabelDangerSubtleSt, "contentText", cmpEqual, "A pending order already exists.", false)==true){
// }

var clmnStatus = Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4.textnodeLabelLabelDangerSubtleSt
var fileStatus = clmnStatus.textContent
Log.Message("Status: " +fileStatus )

//Option 2
if((clmnStatus.Exists)&&(fileStatus=="Order accepted")){
aqObject.CheckProperty(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4.textnodeLabelLabelDangerSubtleSt, "contentText", cmpEqual, "Order accepted")


//Option 3 (Skipped swicth statement (Nothing inside Switch statement got executed))
case "Order accepted":
Log.Message("Order Accepted");

case "A pending order already exists.":

//Option 4 (Skipped the If/else staement during execution)

if(fileStatus = "Order accepted"){
aqObject.CheckProperty(Aliases.browser2.pageFos2.formPlaceorder.tableOrderlist.cellColumn4, "contentText", cmpEqual, "Order accepted")
Log.Message("Order Accepted")
if(fileStatus="A pending order already exists."){

Community Hero

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

If it's skipping the IF statement, then there is something else going on.  I suspect object identification issues still.


Can you get screenshots of the various objects in that Alias tree, how you have them mapped, and how they show up in the Object Browser with all properties visible?  We're missing something somewhere.


Are you getting an error message in the log?

Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors