This question is locked. New answers and comments are not allowed.
Hi
I am using Test studio plug in Visual studio 2010 and I am facing below problems
1. When I converted test to C# code using MSTest framework, I am unable to sync it with the test. i.e. when I add new step it is not being synced in C# code
2. I am unable to use the Data object in generated C# code. I have data in excel and made data binding.
3. In the test when use the coded step
[CodedStep(@"Enter text 'Meher' in 'TxtEnquiryFormNameText'")]
public void WebTest1_CodedStep1()
{
// Pages.x2003FREIGHTERDROPDECKFor.TxtEnquiryFormNameText.Text = Data["Name"].ToString();
string Name = GetExtractedValue(Data["Name"].ToString()).ToString();
Actions.SetText(Pages.x2003FREIGHTERDROPDECKFor.TxtEnquiryFormNameText, Name);
}
I am facing error and the log reads as below
Failure Information: ~~~~~~~~~~~~~~~Exception thrown executing coded step: '[WebTest1_CodedStep1] : Enter text 'Meher' in 'TxtEnquiryFormNameText''.InnerException:System.ArgumentException: The extracted variable 'Name' does not exist in the store. Make sure there is an extract step that has executed before executing this step. at ArtOfTest.Common.Design.Extensibility.ExtractionDataStore.GetValue(String name) at
ArtOfTest.WebAii.Design.BaseWebAiiTest.TestData.get_Item(String column) at Test_Automation_framework.WebTest1.WebTest1_CodedStep1() in c:\users\msrirangam\documents\visual studio 2010\Projects\Test Automation framework\Test Automation framework\WebTest1.tstest.cs:line 84-----------------------
-------------------------------------
Please help
Thanks
Meher
I am using Test studio plug in Visual studio 2010 and I am facing below problems
1. When I converted test to C# code using MSTest framework, I am unable to sync it with the test. i.e. when I add new step it is not being synced in C# code
2. I am unable to use the Data object in generated C# code. I have data in excel and made data binding.
3. In the test when use the coded step
[CodedStep(@"Enter text 'Meher' in 'TxtEnquiryFormNameText'")]
public void WebTest1_CodedStep1()
{
// Pages.x2003FREIGHTERDROPDECKFor.TxtEnquiryFormNameText.Text = Data["Name"].ToString();
string Name = GetExtractedValue(Data["Name"].ToString()).ToString();
Actions.SetText(Pages.x2003FREIGHTERDROPDECKFor.TxtEnquiryFormNameText, Name);
}
I am facing error and the log reads as below
Failure Information: ~~~~~~~~~~~~~~~Exception thrown executing coded step: '[WebTest1_CodedStep1] : Enter text 'Meher' in 'TxtEnquiryFormNameText''.InnerException:System.ArgumentException: The extracted variable 'Name' does not exist in the store. Make sure there is an extract step that has executed before executing this step. at ArtOfTest.Common.Design.Extensibility.ExtractionDataStore.GetValue(String name) at
ArtOfTest.WebAii.Design.BaseWebAiiTest.TestData.get_Item(String column) at Test_Automation_framework.WebTest1.WebTest1_CodedStep1() in c:\users\msrirangam\documents\visual studio 2010\Projects\Test Automation framework\Test Automation framework\WebTest1.tstest.cs:line 84-----------------------
-------------------------------------
Please help
Thanks
Meher