[CodedStep(@"RightClick on Item250Border", RequiresSilverlight = true)] public void CreateAppointment_CodedStep() { //declare variables and set to null int beforeAppCount = Convert.ToInt16(GetExtractedValue("BeforeAppointmentCount")); //before count int appTimeIndex = beforeAppCount % 5; // Appointment start times will cycle between 10:00 AM, 1:00 pm, 2:00pm, 3:15 PM and 4:00 PM switch (appTimeIndex) { case 0: // RightClick on Item154Border - 10:00 am Log.WriteLine("Creating appointment at 10:00 AM"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item154Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 100, 45, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; case 1: // RightClick on Item202Border - 1:00pm Log.WriteLine("Creating appointment at 1 PM"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item202Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 99, 55, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; case 2: // RightClick on Item218Border - 2:00pm Log.WriteLine("Creating appointment at 2 PM"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item218Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 99, 30, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; case 3: // RightClick on Item238Border - 3:15pm Log.WriteLine("Creating appointment at 3:15 PM"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item238Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 99, 40, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; case 4: // RightClick on Item250Border - 4:00pm Log.WriteLine("Creating appointment at 4 PM"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item250Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 100, 40, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; default: // this code should never be executed as long as the number of appointment time options is 3 // RightClick on Item154Border - 10:00 am Log.WriteLine("Creating appointment at 10 AM (default)"); Pages.QAAUTOSYNC1228183918.SilverlightApp.Item154Border.User.Click(ArtOfTest.WebAii.Core.MouseClickType.RightClick, 100, 45, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0))); break; } } Hi,
In my application, i have "Export" button which is used to export the reports from the database to the user system. If i click on the "Export" button, another window named "FIle Download" with the buttons "Open", "Save" & "Cancel" will be displayed. I will be able to open or save the document using those buttons. But if i use test studio to check the functionality of the "Export" button, while recording i got the step as "Handle 'Download' dialog". But while running the same script i got the below error in the log.
Failure Information:
~~~~~~~~~~~~~~~
Timed out waiting '25000' msec. for download dialog to be handled.
InnerException:
System.TimeoutException: Timed out waiting '25000' msec. for download dialog to be handled.
at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DownloadDialogHandlerDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
The "File DOwnload" is not been captured by the test studio for recording. Kindly help me with this issue.
Hi Telerik Team,
I am facing an issue while selecting an item from the list. I am trying to select an item from the list. The list is a ‘Div’ element. In DOM Explorer when I see the list and the items from the list. The list is shown as ‘Div’ tag and all the list items are also shown as ‘Div’ tag. So I believe that the control will not support the methods available for list.
To select an item from the list I am using below code. The code is not returning any error. But it also not selecting an item from the list.
ActiveBrowser.Window.SetFocus();
Pages.Page1.Frame.dropdownButton.Click(false);
System.Threading.Thread.Sleep(2000);
var testList = Pages.Page1.Frame.testList;
HtmlDiv itemToSelect = testList.Find.ByExpression<HtmlDiv>("TagName=div", "class=dropDownItem","InnerText=" + listItemName); // listItemName is global variable
Assert.IsNotNull(itemToSelect, String.Format("Failed to find the list item '{0}' in the list.", listItemName));
// itemToSelect.Click(false);
// itemToSelect.MouseHover();
itemToSelect.ScrollToVisible();
itemToSelect.MouseClick();
System.Threading.Thread.Sleep(5000);