'PerformClick' is not a member of 'Ranorex.Button' error - FIX

Best practices, code snippets for common functionality, examples, and guidelines.
eldorado25
Posts: 34
Joined: Tue Aug 06, 2019 4:14 pm

'PerformClick' is not a member of 'Ranorex.Button' error - FIX

Post by eldorado25 » Mon Apr 19, 2021 3:42 pm

Hi all,

sometimes I create a repository element that's a button - and due to the application I am working on it will need to PerformClick rather than use a Click function as bad web app hierarchy, it's also significantly quicker.

Sometimes I get this error: 'PerformClick' is not a member of 'Ranorex.Button'

So my solution was really simple, edit the rxpath of the repository item and change it from Button to ButtonTag and the issue will be hopefully fixed for you as it was for me.

eldorado25
Posts: 34
Joined: Tue Aug 06, 2019 4:14 pm

Re: 'PerformClick' is not a member of 'Ranorex.Button' error - FIX

Post by eldorado25 » Wed Apr 28, 2021 10:01 am

Also I understand the 'Press()' method is available to use, but this method does not work for some reason in a lot of instances for me.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6544
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: 'PerformClick' is not a member of 'Ranorex.Button' error - FIX

Post by odklizec » Wed Apr 28, 2021 10:16 am

Hi,
Press() method must be used with a great caution, because it does not trigger underlying Key or Mouse events, which may be attached to the button in question! So in case it fails for you, there is most probably such event attached and you must use proper mouse Click action.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration