This is a migrated thread and some comments may be shown as answers.

All my If Else conditions are failing in the scripts

5 Answers 62 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lakshmi
Top achievements
Rank 1
Lakshmi asked on 12 Jun 2013, 10:33 AM
Hi,

Recently i have upgraded my Telerik Test Studio Version to 2012.2.1420.0 from 2012.1.425.0.
I tried to run my scripts which i have created in my prevous version, all my scripts have If else condition and its failing at that step. I am not sure whether that's the issue with version change becuase all my scripts were executed so many times with my previous version without any issues. Also i tried to change the script but it giving the same issue. Please help me with this.

Thanks & Regards,
Lakshmi

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 12 Jun 2013, 12:11 PM
Hello Lakshmi,

We are not aware of any issues related to If/Else logical steps. To help us diagnose your issue, please provide the full failure details of the failing logical step. This can be done by choosing the option to 'Export Results to File' from its Step Failure Details. A Jing video demonstrating the issue may also help us to better understand what is happening. Thanks for providing the info we need to best assist you.

Regards,
Plamen
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
0
Lakshmi
Top achievements
Rank 1
answered on 13 Jun 2013, 09:41 AM
Hi,

There are few steps in my script to verify if there is any item in my basket and for that i created a condition. I was trying to verify if there is any item in the basket remove it and continue shopping. If there is no item in the basket just without doing anything continue shopping. In the below failure steps - then condition is to continue shopping and else condition is to remove the item from the basket as there is an item in the basket in this condition and the else part is always failing in my script.

Overall Result: Fail
------------------------------------------------------------
'13/06/2013 10:36:28' - Using .Net Runtime version: '4.0.30319.1' for test execution. Build version is '2012.2.1420.0'.
'13/06/2013 10:36:28' - Starting execution....
------------------------------------------------------------
------------------------------------------------------------
'13/06/2013 10:36:51' - 'Pass' : 6. Click 'ViewbasketImage'
'13/06/2013 10:37:02' - 'Fail' : 7. IF (Verify 'TextContent' 'Contains' 'You have no items in your basket.' on 'YouHaveNoPTag') THEN
'13/06/2013 10:37:02' - 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 'StartsWith' You have no ite]

Unable to locate element. Search failed!

Learn more about finding elements here:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/unable-to-locate-element.aspx
------------------------------------------------------------
'13/06/2013 10:37:02' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'13/06/2013 10:37:02' - Overall Result: Fail
'13/06/2013 10:37:02' - Duration: [0 min: 30 sec: 785 msec]
------------------------------------------------------------
'13/06/2013 10:37:03' - Test completed!

 

0
Plamen
Telerik team
answered on 17 Jun 2013, 06:01 AM
Hello Lakshmi,

Please try to convert the verification you're using in the if/else logical step to "Wait for condition". It should be "Wait for 'TextContent' 'Contains'" . This will refresh the DOM tree before performing the verification and should resolve the issue. See this article for more information.

Regards,
Plamen
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
0
Lakshmi
Top achievements
Rank 1
answered on 21 Aug 2013, 01:03 PM
Hi,

 I tried changing verify to wait condition but i am still facing the same issue.
Can someone please sort out this issue ASAP...I am struck with this issue.
0
Ivaylo
Telerik team
answered on 26 Aug 2013, 12:17 PM
Hello Lakshmi,

You are experiencing this error because you're running into an "Unable to locate element" error. Here's an article on how to troubleshoot that. As soon as you are able to resolve the issue with the element not found you will be able to execute your test. You can also try changing the find logic of the element in question. Here is another article demonstrating on how you can proceed.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Lakshmi
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Lakshmi
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or