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

Selenium testing with RadWindows

3 Answers 31 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert Vreeland
Top achievements
Rank 1
Robert Vreeland asked on 30 May 2018, 02:29 PM

I am working on some tests using Selenium for UI testing and am having difficulty trying to determine how best to interact with RadWindows that are opened.

One scenario is that I show a radalert dialog or a radconfirm dialog frequently when the user cancels on a page.  How do I use javascript to simulate the user clicking a Close button in the radalert/radconfirm dialog?  The window has no "name" that I can find since I don't define it directly.

Second scenario is when I open a radwindow that contains a form.  Again how can I use javascript to access all the controls in the modal dialog that I open, put text in textboxes and so forth and so on and click buttons etc. 

I cannot find any examples where anyone has used Selenium with the radwindow (or any of the controls).

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 May 2018, 02:41 PM
Hi Robert,

I am sorry to say that we do not have such a demo or documentation available. 

What I can offer is that you go through the information in the following threads as I hope it will be helpful:

I would also suggest that you take a look at our Test Studio product, which is specialized in Automating AJAX, Silverlight, MVC: http://docs.telerik.com/teststudio/general-information/for-qa-testers.


Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Robert Vreeland
Top achievements
Rank 1
answered on 30 May 2018, 02:52 PM

While I understand your desire to push your own testing product and therefore sales, we have no interest or plans to use it at this time and are using Selenium.

If you can't provide any assistance at all, then this simply increases our push to decrease our dependency on the Rad.Ajax controls which we had already started due to their bloated markup and difficulty with making them work in a seamless visual fashion with normal browser controls.

0
Rumen
Telerik team
answered on 31 May 2018, 10:21 AM
Hi Robert,

The ID elements of radalert dialog or a radconfirm dialogs are generated each time and are different. That's why it is better to choose one of the other ways provided by Selenium for elements location:
http://selenium-python.readthedocs.io/locating-elements.html
https://www.seleniumhq.org/docs/03_webdriver.jsp
https://www.seleniumhq.org/docs/cn/appendix_locating_techniques.jsp#

In the Find elements inside forms and iframe using Java and Selenium WebDriver forum you can find suggestions of how to locate elements inside iframes.

It is up to the developer to choose the more convenient and prefered way to access the components when the wrapper of TestStudio is not used, because the controls are resolved and rendered as standard HTML, which can be controlled via the components of the DOM tree.

For the case with RadAlert, RadConfirm and RadWindow, you can use the DevTools toolbar and get reference to them using jQuery and the class of the wrappers of these controls. Please see the attached two screenshots for more information.

You can also see how to get a reference to the client-side objects of the Telerik controls via jQuery in this article: Using jQuery Selectors.

Best regards,
Rumen
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
Robert Vreeland
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Robert Vreeland
Top achievements
Rank 1
Share this question
or