Page 1 of 1

Creating a Customized method for a Control

Posted: Thu Jan 03, 2019 4:01 am
by ankurm.245
Hello,

I have a situation where I need to perform multiple actions on a control every time I interact with that type of control.

For Ex:
txt_someTextBox.Click();
txt_someTextBox.PressKey("{ControlKey down}{AKey}{ControlKey up}");
txt_someTextBox.PressKey("Some Text");

Can I do something like

txt_someTextBox.PressKeyCustom("Some Text");

Where PressKeyCustom would perform below internally:
Click
Ctrl + A
Press Key.

If above is possible, how that can be done as otherwise I would have to write the code every time I use the specific control.

Re: Creating a Customized method for a Control

Posted: Mon Jan 07, 2019 8:43 am
by odklizec
Hi,

This blog post describes exactly what you want...
https://www.ranorex.com/blog/custom-smart-actions/

Re: Creating a Customized method for a Control

Posted: Mon Jan 07, 2019 9:01 am
by ankurm.245
Thanks a lot.