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

Customize code doesn't work for recorded test case

3 Answers 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mukesh
Top achievements
Rank 1
Mukesh asked on 03 Jan 2014, 01:01 PM
Hi,

Following is the test case captured in version 2013.1.1120.0


Same test case when I customize Code it fails.
[CodedStep(@"Verify Item0Customtextbox0.IsEnabled 'Equal' 'False'", RequiresSilverlight = true)]
public void DatalogPreferencePage_Functionality_CodedStep15()
{
    // Verify Item0Customtextbox0.IsEnabled 'Equal' 'False'
    Assert.AreEqual(false, Pages.PC5xxLogin.SilverlightApp.Item0Customtextbox0.IsEnabled, string.Format("Verify Item0Customtextbox0.IsEnabled \'Equal\' \'False\' failed.  Actual value \'{0}\'", Pages.PC5xxLogin.SilverlightApp.Item0Customtextbox0.IsEnabled));
}

I have verified the Element explorer for the Element Item0Customtextbox0 if it is there. But element explorer also have the element in same hierarchy.

I have no clue what has gone wrong. In log following is the error information
'1/3/2014 6:18:16 PM' - 'Fail' : 7. [DatalogPreferencePage_Functionality_CodedStep15] : Verify Item0Customtextbox0.IsEnabled 'Equal' 'False'", RequiresSilverlight = true
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[DatalogPreferencePage_Functionality_CodedStep15] : Verify Item0Customtextbox0.IsEnabled 'Equal' 'False'", RequiresSilverlight = true'.
InnerException:
ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
FindExpression used:
[name 'Exact' ContentInnerBorder] AND [XamlTag 'Exact' border][XamlPath 'Exact' /contentpresenter[name=ContentElement]/_adminpassword[0]/dashboardcontrol[0]/border[0]/grid[0]/border[0]/contentpresenter[0]/radbusyindicator[0]/grid[0]/contentcontrol[name=Content]/contentpresenter[0]/grid[name=LayoutRoot]/customtextbox[0]]
 
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr, Boolean waitOnElement, Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](String[] clauses)
   at TelerikTestAutomation.Pages.PC5xxLoginPage.SilverlightAppElement.get_Item0Customtextbox0() in d:\Cirrus\Cirrus_TFS\Cirrus UI\PC550\Cirrus Test Automation\TelerikTestAutomation_Local\TelerikTestAutomation\Pages.g.cs:line 4256
   at TelerikTestAutomation.Setup_Page.Data_Log_Preferences.DatalogPreferencePage_Functionality.DatalogPreferencePage_Functionality_CodedStep15() in d:\Cirrus\Cirrus_TFS\Cirrus UI\PC550\Cirrus Test Automation\TelerikTestAutomation_Local\TelerikTestAutomation\Setup Page\Data Log Preferences\DatalogPreferencePage_Functionality.tstest.cs:line 496


We are using Visual studio 2012 for capturing and executing test cases.

Please help ASAP.

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 07 Jan 2014, 08:32 PM
Hello Mukesh,

To assist with this I need an export from the Step Failure Details. Find and click Export. That will generate a .zip file containing the information I need to assist in diagnosing this problem. Please attach that .zip file.


Regards,
Cody
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Mukesh
Top achievements
Rank 1
answered on 08 Jan 2014, 06:15 AM
Hi,

PFA the attached Zip file.
As we are not allowed to share the entire dashboard of our application outside organization. I have shared with you only the area of page where control is is checked if it is enable. Rest of the files are as it is exported.

Thanks.

Regards,
Mukesh Jayaswal
0
Cody
Telerik team
answered on 09 Jan 2014, 09:12 PM
Hi Mukesh,

Thank you for the additional information. Unfortunately, due to a bug in Test Studio, we didn't get a capture of the Silverlight Visual Tree which I need to be able to see before I can get to the root cause. Instead I created this video as a demonstration how you can diagnose, and hopefully fix this problem on your own.
http://screencast.com/t/yu1DsKHauCaI

Let me know if you need further assistance.

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