Forum Discussion
AlexeyK
Alumni
14 years agoHi Steven,
Try using the following code:
login_name = "Logged in as soki1"
set Login_object =Aliases.iexplore.OrderHistory.panelHeader.panelHeaderWrapper.panelAuthorize.textnodeFirst
If Login_object.innerText = login_name Then
Log.Message "Logged in as soki1"
Else
Log.Warning "Not logged in as soki1"
End If
Most likely, you have the Stop on error property enabled in your project (the Tools | Current Project Properties -> Playback group in the tree on the left). When this property is enabled, TestComplete stops the test run if an error message is posted to the test log. The aqObject.CheckProperty method posts an error message to the log if the comparison fails. So, a possible alternative to using the If Then statement is to disable the "Stop on error" project property.