I have created if/else condition, if part is working OK, but else if failing. I have attached execution log...
'19.2.2016 13:27:18' - 'Pass' : 1. Navigate to : '/'
'19.2.2016 13:27:18' - 'NotRun' : 2. Wait for 'TextContent' 'Contains' 'Sign in to start your session' on 'SignInToPTag'
'19.2.2016 13:27:33' - 'Fail' : 3. IF (Wait for 'TextContent' 'Contains' 'Sign in to start your session' on 'SignInToPTag')
'19.2.2016 13:27:33' - Unable to determine logical branch to go into. Unable to execute verification.
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Html] element using
Find logic
(Html): [tagname 'Exact' p] AND [TextContent 'Exact' Sign in to start your session]
Unable to locate element. Search failed!
6 Answers, 1 is accepted
Hi Uros,
Looking at your steps, i believe If the "IF" statement is working, im assuming the "ELSE" statement will only run when you are already logged in, which would mean that [TextContent 'Exact' Sign in to start your session] would not be found.
I hope that it helps, and made sense :)
Regards
Ian
Hi Uros,
The problem is, when the ELSE statement is to be run, you are basing it on "TextContent contains" on a element that is not there ('SignInToPTag').
if you change the verification statement for the element 'SignInToPTag' to "Wait for exists".
When the IF statement cant be run, the ELSE will run.
Regards
Ian
I guess what Ian says is making sense, did you manage to solve the problem?
@Ian Thank you for helping in public forums, I have updated your telerik points accordingly.
Regards,
Ivaylo
Telerik
Yes, the suggested tip solved the problem. Thx Ian.
I have followed the example in documentation (http://docs.telerik.com/teststudio/features/logical-steps/if-else) and end up in this situation...
Glad to hear it is working. We will address this in our documentation.
Regards,
Ivaylo
Telerik