Webaii Automation - Clicking 'OK' on a dialogue box

211 Views Asked by At

I am currently writing a number of automated tests (using C# and the Webaii framework) to test a SilverLight website. When I try to delete an element on the website a dialogue popup appears on screen asking if I am sure that i want to delete the element. I want to click the 'Yes/OK' button. is there a way of automating clicking the 'yes/ok' button?

1

There are 1 best solutions below

0
On

I work for Telerik in the Test Studio and Testing Framework support department. I will endeavor to assist you with this problem. I'm sure there's a way to automate it, but it depends on exactly what type of dialog this is. A picture of this dialog will show me what type of dialog it is we're dealing with, and then I can better direct you on the right approach.

If it's like a JavaScript confirm dialog, you want to handle it using our confirm dialog handler. The basic approach is documented here: http://docs.telerik.com/teststudio/user-guide/write-tests-in-code/advanced-topics/handling-html-popups-and-dialogs/built-in-dialog-handlers/handling-javascript-dialogs.aspx. If it's a dialog shown using Silverlight elements, you should be able to find the element and click on it.