'PerformClick' is not a member of 'Ranorex.Button'

Ranorex Spy, Recorder, and Studio.
mashrino1
Posts: 4
Joined: Wed Mar 30, 2016 12:30 pm

'PerformClick' is not a member of 'Ranorex.Button'

Post by mashrino1 » Wed Mar 30, 2016 12:51 pm

Hi,

When I give this code "Button2.PerformClick()" I am getting 'PerformClick' is not a member of 'Ranorex.Button' error. Could you please help me to solve this issue.

Thanks in advance

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

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

Post by Martin » Thu Mar 31, 2016 11:28 am

Try

Code: Select all

Button2.Press();
Last edited by Martin on Thu Mar 31, 2016 11:31 am, edited 1 time in total.

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

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

Post by odklizec » Thu Mar 31, 2016 11:29 am

Hi,

I'm afraid, there is not enough info in your post regarding your problem. Please answer the following questions:

Ranorex version?
Tested technology (HTML, Java, WPF, MFC, iOS, Android, etc...)?
Please post a Ranorex snapshot (not screenshot) of the problematic element. Because you are new here, you may need to use a 3rd party storage (google drive, one drive, dropbox) and post a link without 'http' or 'www' ;)

BTW, usually, it should be enough to select proper Adapter Type instead of letting Ranorex to select it. Just select "Button" instead of "Default" adapter type (in repository properties for given element):
AdapterType.png
AdapterType.png (5.43 KiB) Viewed 1211 times
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

mashrino1
Posts: 4
Joined: Wed Mar 30, 2016 12:30 pm

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

Post by mashrino1 » Mon Apr 04, 2016 12:41 pm

Hi Martin,

Thank you for your reply. For button it is working fine. For combo box without moving the mouse is it possible to select a value. Could you please help me on this.

Thank you very much for your support. :D

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

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

Post by asdf » Fri Apr 08, 2016 12:04 pm

Hi mashrino,

To select an entry of a combobox, you could use the SetValue-Action.
SetValueAction.png
SetValueAction.png (4.32 KiB) Viewed 1153 times
The corresponding code for that action would be:
repo.Form.ComboBox.Element.SetAttributeValue("SelectedItemText", "YourValue");
I hope this helps.

Best Regards,
asdf