NullReferenceException on MouseClick()

3 posts, 0 answers
  1. Silvio
    Silvio avatar
    52 posts
    Member since:
    Dec 2012

    Posted 31 Jan 2013 Link to this post

    Hi,

    In time it happens very often, that I get a NullRefernceException when I click an element with MouseClick. This doesn´t happen when I run any other command like Click, Focus, Refresh or something else.The element isn´t null anyway.
    Is there any known issue?

    Kind regards
    Silvio
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 05 Feb 2013 Link to this post

    Hello Silvio,

    A significant difference between all of these methods is that only the MouseClick method simulate a real user action. It is possible to get NullRefernceException if the element you're trying to click on is not currently presented on the screen. If this is the case, to overcome the issue try using the ScrollToVisible method before the MouseClick.

    If you are experiencing something different a local reproduction is needed. Please provide the means to reproduce the issue locally(either in your app or on a public site), so we can try to determine what is causing the problem. Alternatively you can record a Fiddler trace using FiddlerCap and send it to us in a zip file.

    Kind regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Silvio
    Silvio avatar
    52 posts
    Member since:
    Dec 2012

    Posted 06 Feb 2013 Link to this post

    Hi,

    thanks for your help! I managed to make it work with Click. If it becomes a problem again, I´ll try your advise and send you a testproject if it doesn´t work. In time I´m fighting with an other problem, which I describe in the next thread.

    Kind regards
    Silvio
Back to Top