I am using WatiN to run some UI automated tests on my application that uses Telerik RadControls. I have been able to interact with most of telerik controls, except RadAsyncUpload.
Currently I am unable to upload a file using WatiN. I understand that telerik uses another testing platform, but I am looking to see if maybe someone can help me figure out how to use WatiN to uplad a file via the RadAsynUpload control.
<telerik:RadAsyncUpload ID="upAttachment" runat="server"AllowedFileExtensions=".pdf,.jpg,.jpeg,.gif,.png,.bmp" TabIndex="9">
Probably the test failure is caused by third party modules like silverlight, flash and file api which RadAsyncUpload uses. Try to set DisablePlugins="True". Note that this can break existing functionality like MultiFileSelection.
Related
I am using HtmlAgilityPack 1.6.2 within a .NET Core 2.0 Console application. HtmlWeb.Load function works fine but LoadFromBrowser function is not available. I got a compiler error. The testing code is copied from the tutorial page so it should be correct. Please advise how to use the API.
The LoadFromBrowser method requires the WinForm WebBrowser to work.
Since there is not WebBrowser in .NET Core 2.0, this method is not available.
This method could be available in the future by replacing the WebBrowser by an open source browser but there is currently no short-term plan for it.
EDIT: Answer comment
Is there still no solution for this?
I didn't try it, but some package support web browser for .NET Standard such as : https://www.nuget.org/packages/Selenium.WebDriver
So perhaps if you use this package to retrieve the HTML and use it with HAP, that will work.
I have the same prob, installed Selenium.WebDriver, but don't know how to use it with HAP to wait until JS is loaded.
I have two questions. My first question is: Do applications exist which measure the coverage of GUI testing for web applications (not code, but the coverage of GUI components on web page)?
My second question is:
Is GUI testing with Selenium for example necessary if we have tests for javascript as well?
Thank you in advance.
You can write your custom application to find all dom elements using http://www.w3schools.com/js/js_htmldom_elements.asp, store this in some place and after completing your test automation framework run this utility to make sure that none of the elements are missing.
GUI test is required to make sure that all your integration points b/w several backend API are working. Also we will be sure that non of the UI elements are break over UI and all your business use cases are working as expected. Mostly UI testing is done for Acceptance Testing and we can show to the customer that all there use cases are working as expected. Later in the next release you can make sure that you are not breaking any UI code. UI testing gives us confidence while releasing to end users.
I am building a new asp.net MVC3 web application for reporting and I want to know the best way to create reports.
I've tried to use Crystal reports but its has some issues in implementation and styling so Is there is a free or customized solution for that?
After alot of searching in google i found a good solution that meets my needs that is a free open source tool here called doddleReports it creates pdf, excel, csv comma delimited, HTML report
I have used worddocgenerator.codeplex.com as a reporting tool in one lightweight ASP.NET application. It allows you to generate data bound content with very few code.
To preview reports you can use the Open Xml Viewer
I would like to ask if anybody knows an easy way to test Telerik controls with Watin.
We are about to start using it but before we do I wanted to see if there is anything I would need to know.
The problem that I can see we will be having is that if even smallest thing changes then all our tests will also break.
Any suggestion is greatly appreciated.
The problem that I can see we will be having is that if even smallest thing changes then all our tests will also break.
This could/will be true of all portions of your pages, including Telerik controls, depending on your test structure. Ideally, your elements will have IDs assigned and you'll use Page classes and custom control objects to remove all HTML references from your actual test code. Then if something changes on the webpage (or in a control), you verify the change is expected, then you change the WatiN page code (or control code) and re-run your tests.
The WatiN page class primer is here: http://watinandmore.blogspot.com/2009/06/introducing-page-class.html
Basically, you want to have your test code look like myPage.PickDate("3/29/2012") and not like ie.Tables[3].TableRows[2].TableCells[4].Textbox(Find.ByClass("datePicker")).TypeText("3/29/2012")
Changes can, do and should result in failing tests, however, I can attest that with a good page (or control) class setup that abstract away the HTML DOM and other specifics leaving non-HTML-filled test code, means that when changes do happen they are most often easy to get working again.
Note: Selenium also has a Page class concept, but I have not used it very much as of right now. Bottom line: If you write a lot of tests that reference the HTML DOM directly in test code, you're setting yourself up for a maintenance headache regardless of if you go with WatiN or Selenium or whatever.
Added: As to your original question: Can you work with Telerik controls in WatiN? Yes you can most likely, but depending on the control you may need to get a bit creative, possibly even calling javascript methods from within your test (page object ;) ). I've been stumped by a couple controls (non-Telerik) but most I've eventually figured out.
I realize you asked about WatiN, and I know I'll probably get downvoted into oblivion, but I might recommend Selenium instead. It seems to be more widely used and when we were evaluating the two we found Selenium easier to work with because of the Firefox plugin to record/generate the tests. This meant that our non-technical folks could set up the tests.
Since then we've successfully used Selenium to test ASP.NET sites that utilize Telerik controls. I only ran into one issue, with the RadNumericTextBoxes, which I've documented a fix for here: http://www.msigman.com/2012/02/entering-radnumerictextbox-selenium-webdriver-1-6-0/.
I'm currently in the process of writing a how-to guide for doing it: http://www.msigman.com/2012/03/automated-testing-asp-net-web-application/ (shameless plug).
You should also consider evaluating Telerik's Test Studio, our functional automation test tool. (Disclosure: I'm their evangelist for Test Studio.)
Test Studio really shines when you're working with Telerik controls. You'll get some great additional functionality around being able to dive deeper in to verifications and actions around the controls.
Even more importantly, Test Studio handles centralizing locators and pages by default, so you don't need any additional effort to best manage your UI changes.
I am looking for a way to integrate jasper reports in a netbeans platform application. I have googled this and there seem to be no direct answer, so am asking to be helped in this.
to be specific i use a MySql database and ireport designer to design my reports. I need to display the specific reports in a report viewer and display it in a top component.
please direct me on a way to accomplish this.
It seems like you should be using the JRViewer component.
Have a look at this Jasper Reports Swing tutorial. The only difference is that instead of embedding your JRViewer in a JFrame you'll be embedding it in a TopComponent