Can we get and set value through window control selector?

Now we can use window control selector to locate an element of a windows application, it will be great if we can get and set values directly from the selector.
Thanks a lot!

We are working on adding this functionality as out-of-the-box feature to RPA Express.

In the meantime, you can use these actions to get the value (text) of the window control

Additionally, you can vote for this feature in this topic

I see there’s a custom action using getText() to get the value
Is there a way to use ‘setText()’ to set the value?

1 Like

Yes, there is a method in our API to do it

@CustomScriptAction(
)

def customScript() {

$("object_selector").setText('text_to_insert')

}
1 Like

@yangyanz you can find links to API and other useful links here
https://kb.workfusion.com/display/RPAe/Script+as+Custom+Action

Hi @ashapkina this custom script is great! Is there anyway to use input variables as the object_selector and text_to_insert? I can’t seem to get that to work.

1 Like

It will a little bit different if you save the object selector in a variable. You can do it in 2 ways:

@CustomScriptAction(
   input = ['object_selector','text_to_insert']
)

def customScript() {

$(object_selector as String).setText(text_to_insert)

}
@CustomScriptAction(
   input = ['notepad_selector','text_to_insert']
)

def customScript() {

$("${object_selector}").setText(text_to_insert)

}
2 Likes

First try on the first custom action and it worked fine. Thanks!

1 Like

What data type is an object selector and how do you set it up ?

@gancw you can get and set String values from/to object selectors.