Hi,
My script is not able to locate a Silverlight control which is inside a RadPanel and it throws Out of bound exception. Here are the steps:
1. I perform a few steps like loading the application, login and other things which are working fine.
2. I scroll the RadPanel to top of the page and then click it. This expands the RadPanel and here is when the Silverlight Application is loaded. You can now see a Silverlight Hyperlink button. Screenshot name “Step 2”.
3. When I click on the Hyperlink “AddDocumentlink..” the action is recorded and when I try to run the script it doesn’t click this hyperlink and an exception is seen.
The code that is recorded is:
[CodedStep(@"Click AddDocumentLinkHyperlinkbutton", RequiresSilverlight=true)]
public void AddProduct_CodedStep2()
{
// Click AddDocumentLinkHyperlinkbutton
Pages.RoadmapGetOnTheMap3.SilverlightApp.AddDocumentLinkHyperlinkbutton.User.Click();
}
Error Message: Exception thrown executing coded step: '[AddProduct_CodedStep2] : Click AddDocumentLinkHyperlinkbutton, RequiresSilverlight=True'.
Exception is:
ArtOfTest.Common.Design.Exceptions.ExecutionException: Exception thrown executing coded step: '[AddProduct_CodedStep2] : Click AddDocumentLinkHyperlinkbutton, RequiresSilverlight=True'. ---> System.InvalidOperationException: Point (223, 1027) outside bounds of browser window: (0, 140, 1366, 565)
at ArtOfTest.WebAii.Silverlight.UserInteraction.ValidateMouseLocationIfNeeded(Point point)
at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType, Point offsetPoint, OffsetReference reference)
at ArtOfTest.WebAii.Silverlight.UserInteraction.Click()
at BgRoadmap.AddProduct.AddProduct_CodedStep2() in d:\WebUI Automation\BgRoadmap\AddProduct.aii.cs:line 188
--- End of inner exception stack trace ---
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteSteps(AutomationStepList stepList, TestResult testResult, Object codeBehindInstance)
Please let me know how can I resolve this. Thanks, Mithul.