This is a migrated thread and some comments may be shown as answers.

NullReferenceException on MouseClick()

2 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Silvio
Top achievements
Rank 1
Silvio asked on 31 Jan 2013, 02:40 PM
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 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Feb 2013, 03:11 PM
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
0
Silvio
Top achievements
Rank 1
answered on 06 Feb 2013, 04:14 PM
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
Tags
General Discussions
Asked by
Silvio
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Silvio
Top achievements
Rank 1
Share this question
or