Clicking on button giving the unhandled exception

2 posts, 0 answers
  1. Amardeep
    Amardeep avatar
    7 posts
    Member since:
    Feb 2013

    Posted 14 Aug 2013 Link to this post


    I am trying to click on the button on silverlight application but its throwing an exception. I have used the same method for clicking on other button where it worked. Not sure why it is throwing an exception here.
    public void OpenChartTemplate()
      public void ClickChartButton(string buttonName)
              Button button = _app.Find.ByName<Button>(buttonName);
          catch (TimeoutException exc)
              Trace.WriteLine("@" + DateTime.Now.ToLongTimeString() + " " + buttonName + " " + exc.ToString());
  2. Boyan Boev
    Boyan Boev avatar
    1072 posts

    Posted 19 Aug 2013 Link to this post

    Hello Amardeep,

    There are several possible reasons for that issue:

    1. If the button is not present on the visible screen. Unfortunately there is a limitation of the Visual Tree contained in the Silverlight engine. Silverlight puts into the Visual Tree only the UI components necessary to render the page on the screen. You can count only the already rendered rows on the screen.

    You need to scroll to that button first and then find it.

    2. The button is loading too slow, you should add a wait for exists step.

    If the issue persists please: 

    1. Send us the entire trace log.

    2. Please record a Jing video demonstrating the entire process, so we can better understand what is happening. 

    3. Please provide us with a copy of your test and if it is possible grant us access to your application so we can reproduce the issue on our end and give you a solution. If it is not possible to grant us access to your application, please take a Fiddler trace and attach it to a support ticket in a zip file. You can capture a Fiddler trace using FiddlerCap.

    Hope to hear from you soon. 

    Boyan Boev
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top