Completed
Last Updated: 19 Dec 2013 16:26 by ADMIN
ADMIN
Plamen
Created on: 15 May 2013 09:22
Type: Bug Report
1
Click step recorded against a Silverlight element, doesn't scroll the element to a visible position before performing the click.
Click step recorded against a Silverlight element, doesn't scroll the element to a visible position before performing the click. This causes the step to fail with the following exception:

Failure Information: 
~~~~~~~~~~~~~~~
Point (1109, 990) outside bounds of browser window: (164, 126, 1110, 765)
You might need to maxmize the browser while running this test. Try adding the following code in a coded step: ActiveBrowser.Window.Maximize();
InnerException:
System.InvalidOperationException: Point (1109, 990) outside bounds of browser window: (164, 126, 1110, 765)
You might need to maxmize the browser while running this test. Try adding the following code in a coded step: ActiveBrowser.Window.Maximize();
   at ArtOfTest.WebAii.Silverlight.SilverlightApp.ValidateMouseLocation(Point point)
   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType, Point offsetPoint, OffsetReference reference)
   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.HyperlinkButtonClickActionDescriptor.Execute(IApplication hostApp)
   at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Same scenario works as expected in older version of Test Studio(2010.3.1421). 

The workaround is to convert the click step into coded step and use the ScrollToVisible method like this:
Pages.MyPage.SilverlightApp.Pagenavlink.ScrollToVisible()
Pages.MyPage.SilverlightApp.Pagenavlink.User.Click()
3 comments
ADMIN
Pavel
Posted on: 21 Aug 2013 14:43
This issue will be resolved in the next service pack.
Robert
Posted on: 20 Jun 2013 19:40
I have this issue.  Maximize won't work as it is a SL pop-up window and requires user to scroll to the right.  I tried the following code but still get the Error: Exception thrown executing coded step: '[Locate_Added_Record] : Locate Added Record'.
InnerException:
System.InvalidOperationException: Point (1985, -667) outside bounds of browser window: (1684, 114, 1672, 884), etc. 

My CODE Snippet:
        public void Locate_Added_Record()
        {
            SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
            String searchString = "Zinn, Robert  D.";
            //ActiveBrowser.Window.Maximize();  
            Pages.MySLApp.SilverlightApp.AwardsAdminGrid_HorizontalLargeIncrease.ScrollToVisible();

            
                 FrameworkElement fwe = app.Find.ByExpression(new XamlFindExpression("textcontent="+searchString));   
                                    
                 if (fwe.ToString() != null)
                 {
                    Log.WriteLine("Match found: Record was ADDED - String value is: " + fwe.TextLiteralContent.ToString());
                                        
                    FrameworkElement button = app.Find.ByAutomationId("delete");
                    Log.WriteLine("Trying to DELETE record");
                    // Next line is throwing an error.  
                    button.Parent().User.Click();  
                 } 

Robert
Posted on: 20 Jun 2013 19:40
I have this issue.  Maximize won't work as it is a SL pop-up window and requires user to scroll to the right.  I tried the following code but still get the Error: Exception thrown executing coded step: '[Locate_Added_Record] : Locate Added Record'.
InnerException:
System.InvalidOperationException: Point (1985, -667) outside bounds of browser window: (1684, 114, 1672, 884), etc. 

My CODE Snippet:
        public void Locate_Added_Record()
        {
            SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
            String searchString = "Zinn, Robert  D.";
            //ActiveBrowser.Window.Maximize();  
            Pages.MySLApp.SilverlightApp.AwardsAdminGrid_HorizontalLargeIncrease.ScrollToVisible();

            
                 FrameworkElement fwe = app.Find.ByExpression(new XamlFindExpression("textcontent="+searchString));   
                                    
                 if (fwe.ToString() != null)
                 {
                    Log.WriteLine("Match found: Record was ADDED - String value is: " + fwe.TextLiteralContent.ToString());
                                        
                    FrameworkElement button = app.Find.ByAutomationId("delete");
                    Log.WriteLine("Trying to DELETE record");
                    // Next line is throwing an error.  
                    button.Parent().User.Click();  
                 }