We have an application where we need to verify application data with Export to PDF,Excel,Word and XML.
For Ex. In your application there are several records of employees of your organization which displays in the Html Table. You need to add one record and after that need to verify this all data (Old employees data+Newly added) on clicking Export to pdf, pdf opens and you need to verify the pdf data with application Html data
Thanks,
Deepak
12 Answers, 1 is accepted
Test Studio cannot connect to nor automate against a browser instance that directly loads a PDF file. This is because it does not have a DOM like a traditional web page.
You can write custom code to open and read an Excel, Word, or XML file on disk, however there is no built-in functionality in Test Studio nor the Framework to handle this.
Anthony
the Telerik team
Test Studio Trainings
I have a code block that will do something like this, for a test that I am writing.
Currently though, I'm just echoing out file exists/doesn't exist to the console.
How can I add the output of my file check to Test Studio standard logging please? Where in the API is this?
You can use Log.WriteLine to write a string to the log. You can use code like this to capture your output as a string to pass into Log.WriteLine.
Anthony
the Telerik team
Test Studio Trainings
I linked to the wrong page. See here for the Log.WriteLine method and here for all the Log members.
Anthony
the Telerik team
Test Studio Trainings
Certainly you can directly log the result of your file check. We simply suggested the more advanced console output approach in case you required it.
Anthony
the Telerik team
Test Studio Trainings
I've tried this in several formats now, but the test just stops at that point.
Does the file checking need to be in some form of spawned process?
We won't be able to provide in-depth troubleshooting for non-Telerik Testing Framework code. The Throw New Exception section in this article has a basic code sample that checks for the existence of a file. You can easily replace the code in the ELSE portion with another Log.WriteLine.
Anthony
the Telerik team
Test Studio Trainings
Are you using a coded step in Test Studio or a coded unit test using the Telerik Testing Framework (this is the Framework forum)? There really isn't the concept of a "step" in a Framework test, just lines of code.
The bottom line is we'll need to see the code you're using to analyze the implementation you've chosen and to diagnose why it isn't working.
Anthony
the Telerik team
Test Studio Trainings