I'm guessing that there may be extra non-printing characters (like a carriage return or something) that is causing the difference. Put a breakpoint on your comparison line and see what the value of the two variables are. |
I did what you told me to, and the result of both variables are the same... But instead of debugging, I generated a Log.Message() to see the results after the test.
Here is my code:
retornoCadastrar2 = lblResultado.innerText
If retornoCadastrar <> retornoCadastrar2 Then
Log.Message("If " &retornoCadastrar& "<>" &retornocadastrar2)
Log.Error("Falha na inserção!")
Else
Log.Message(retornoCadastrar)
End If
It keeps jumping into Log.Error() statement even the If conditional being False.
And here is my Log.Message() result:
If Encargo '102' inserido com sucesso. <> Encargo '102' inserido com sucesso. |