I understand that you are trying to test for the correct text. Look at the error I have highlighted. That object does not exist error can cause your text error below it. Resolve that error first and see if the text error goes away.
Sometime our application give those CAS Error. We need to check those error and notify those to team. It is fine "The object does not exist" error appear" This object does not exist error coming as we are trying to verify the object from the application when the application has no issue .
Since application has issue which mean CAS error that is whu script generate the error "Object does not exist" it is perfectly fine . The only thing we need to check whether in the browser tile the CAS error appear?