Hi,
I’m using trail version of QA edition Q3 release. I want to know is there any feature which will helps me writing data to excel sheet?
More clear; in my Silverlight web application I created some data, I want to store that data in excel spread sheet using this Web UI QA tool.
Help is appreciated.
Thanks & Regards,
Madhu Tekmal
26 Answers, 1 is accepted
WebUI Test Studio includes the Element Extraction feature which you'll probably want to use.
Check out this video:
http://tv.telerik.com/watch/automated-testing-tools/using-element-extraction-variables-webui-test-studio
Once you've extracted a value you can access it from a Coded Step with the following code:
String extractedValue = this.GetExtractedValue("MyExtractedVariableName");
To add a Coded Step on ScriptStep in the Record View (see screenshot 1). This will create a new (C# or Visual Basic) method where you can write your own logic.
You'll have to write your own logic to store data into an Excel file. It's not very complex and you'll find plenty of tutorials on the Internet.
Keep in mind that it will probably require that additional Assembly references to your project. Here's an article that describes how this is done in case you need to do it.
Let me know if you need more assistance with this!
All the best,
Thanks for detailed solution.
I'm able to extract value into a variable [$(Result)], now trying to add Assembly Reference (Microsoft.Office.Interop.Excel.dll) from C:\WINDOWS\assembly to my project, but it doesn't work (see enclosed video capture). The same DLL trying to drag to other location also not working? If DLLs are in other location say C:\Program Files\Telerik\WebUI Test Studio 2010.3\Bin those are adding without any issue. Bottom line: C:\WINDOWS\assembly DLLs are unable to add to Project References under User Settings.
Suggestion/Request: Storing extracted values into Excel sheet is common in as part of test automation; adding DLLs and writing a code to store data back to excel is challenging to testers more over time consuming. Anyway, we are binding a data source in the form of excel/csv taking the reference of the column name in excel and store extracted value into the same column?
don't add them from the Global Assembly Cache (C:\Windows\assembly). That's not really a folder in the normal sense of the word.
Instead add them from their "real" location on the file system. (like I'm doing in this video). After you add an Assembly take a look at the name under which the assembly was added to the list. If the name consists of the path to the location of the DLL file then you'll need to add it to the Global Assembly Cache as described in this article this article.
I've created feature request:
103917:FR> Writing data to excel sheet (instead of reading as in Data Binding)
to address your request. We'll discuss it soon.
I hope this helps!
Let me know if you have any more questions.
Best wishes,
Has the feature request to write data to excel been completed?
Thank you
Any updates on this please? Requested this feature almost 3 years back!
Thanks,
Madhu
@Madhu, did Stoil approach help you? Do you need some additional help with your case? Please do not hesitate to contact us.
@Brian, please elaborate on your case a bit more. What assistance do you need? We will be glad to help you if you share some more detailed information.
You can also raise a support ticket so we can investigate your issue further.
Regards,
Boyan Boev
Telerik
Test Studio Trainings
I was inquiring to the status of the feature request mentioned below:
103917:FR> Writing data to excel sheet (instead of reading as in Data Binding)
Thank you.
The feature request is not developed yet because it is very common.
Please go ahead and submit a private ticket with your custom case and we will be glad to help you/customize the FR.
Thank you!
Regards,
Boyan Boev
Telerik
Test Studio Trainings
System.Data.OleDb.OleDbConnection MyConnection ;
System.Data.OleDb.OleDbCommand myCommand = new System.Data.OleDb.OleDbCommand();
string connectionpath =" "; //Include Directory path and filename here
MyConnection = new System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;Data Source="+ connectionpath +";Extended Properties=\"Excel 8.0;HDR=No;\"");
MyConnection.Open();
myCommand.Connection = MyConnection;
string Variable = "foo"
myCommand.CommandText = ("UPDATE [Sheetname$A2:A2] SET F1='" + Variable + "'"); //Set cell A2 in the sheet "Sheetname" F1 (is the field) to the Variable string
myCommand.ExecuteNonQuery();
MyConnection.Close();
}
catch (Exception ex)
{
Log.WriteLine(ex.ToString());
}
needs a semicolon and should be:
string Variable = "foo";
Thank you for sharing your knowledge.
Regards,
Boyan Boev
Telerik
Test Studio Trainings
LOG: System.Data.OleDb.OleDbException (0x80004005): External table is not in the expected format.
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
This exception doesn't come from Test Studio. It is pure Microsoft Office exception.
"External table is not in the expected format." typically occurs when trying to use an Excel 2007 file with a connection string that uses: Microsoft.Jet.OLEDB.4.0 and Extended Properties=Excel 8.0
Here is a fast Google search about it.
Hope it helps.
Regards,
Boyan Boev
Telerik
Test Studio Trainings
error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2013.1.1002.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'
i am geting this error
Hi Support
Can anyone please help me in this
regards
Soumya
Hi Soumya,
Looks like your Telerik assembly file corrupted, try re-installing Telerik TestStudio (latest version) and assembly files.
Thanks,
Madhu.
Hi madhu
when i try to run the same in another machine i faced the same issue .
Can you check your TestStudio settings showing excel assembly? see attached.
still getting the below error
error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2014.3.903.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'
error CS1705: Assembly 'ArtOfTest.WebAii.Design, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=4fc62bbc3827ab1d' uses 'Telerik.TestStudio.Interfaces, Version=2016.3.928.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de' which has a higher version than referenced assembly 'Telerik.TestStudio.Interfaces, Version=2014.3.903.0, Culture=neutral, PublicKeyToken=b9f4c4e36181b3de'
Still getting the below error
Madhu is there any other way i can get in touch with you.need urgently to fix this for a demo
Yes.
madhu.tekmal@clearstructure.com
Have you tried the suggestion I've given to you in your other thread?
Hope to hear from you soon.
Regards,
Boyan Boev
Telerik by Progress
Test Studio Trainings
Hi Boyan
Thanks for the reply but i am still not able to write data into the excel sheet.Seems telerik is not a cup of my tea.
can you please spend some time with me to fixing the excel issue .If so please let me know i would send u a meeting intive
I have posted a reply to your query in the other thread you shared your difficulties. Please refer to it for further information.
I would like to kindly ask you to avoid posting duplicate queries in different threads since this could bring to misunderstandings and double efforts from both sides. Thanks in advance for your understanding.
Regards,
Elena Tsvetkova
Telerik by Progress
Test Studio Trainings