InvokeAction

Ranorex Studio, Spy, Recorder, and Driver.
rawatankit6
Posts: 11
Joined: Thu Aug 21, 2014 7:50 pm

InvokeAction

Post by rawatankit6 » Sat Jan 17, 2015 11:54 am

What all actions are supported by InvokeAction(String, Object[]) and InvokeActionWithText(String, String[]) methods and when to use these methods ? And Please tell more about the .Focus() and .ensureVisible() which comes with InvokeAction and when to use them ?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: InvokeAction

Post by Support Team » Mon Jan 19, 2015 1:35 pm

Hello rawatankit6,

The Invoke action can be used for several methods depending on the type of your element. In order to check which Invoke action is available for a specific repository element, just drag&drop your element to the recording table and choose an Invoke action:
InvokeAction.png
The Invoke actions Focus() and EnsureVisible() are available for all elements (adapters).

Regards,
Robert
You do not have the required permissions to view the files attached to this post.

rawatankit6
Posts: 11
Joined: Thu Aug 21, 2014 7:50 pm

Re: InvokeAction

Post by rawatankit6 » Mon Jan 19, 2015 6:55 pm

Thanks for your reply but it didn't clear my doubt, I tried using Invoke Action and InvokeActionWithText on elements of type "input", 'button", "image" mostly for click operation but it worked on some and not on others moreover the arguments these method accepts confuses me a lot.
How one can make sure what arguments these controls will support because I noticed the "PerformClick" action using InvokeAction method is not visible when one drag and drop the control to the recording pane but can be written in the string argument it support.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: InvokeAction

Post by Support Team » Tue Jan 20, 2015 1:52 pm

Hello rawatankit6,

The easiest way to find out which Invoke actions are available for a specific element is the mentioned drag&drop to the recording table.

In general, it depends on how the control or the method to invoke is implemented. We can’t provide any parameterization for custom (public) methods. These methods can be called via InvokeActionWithText(String, String[]), which allows you to specify the name of the method to be called and the parameters you want to pass to the method.

The PerformClick()-action is just available for WebElements. Further information can be found here: http://www.ranorex.com/Documentation/Ra ... mClick.htm

Regards,
Robert