Tip - custom selectors following 0.93 upgrade

It is no longer possible to get a selector value via

Console.Write Message: your.selector.name

as it was previously. You will throw an error (try it with your 9.2 scripts).

EDIT: Nonetheless, you can still create WEB custom selectors using the methods listed here based primarily on @jokoum’s research. The UiAutomation custom selectors no longer work, though.

You just can’t write the values of the selectors created via UiSpy in the appmask to console, at least I haven’t been able to yet today. :grimacing: Still trying, though.

EDIT: Please see @jpap’s post below!

Regards,
burque505

@burque505
From now on custom selectors have to be called by using their full name.
It is not possible to assign them to a variable and call them by referencing the variable in the script anymore.

Best regards,
J.

1 Like

@jpap, that certainly is true for UiAutomation, as I discovered following your post. :hot_face:

The following code works, though.

webcap

set selectorSeparator to '{<{<{<SelectorSeparator>}>}>}uia3://'
set webSelector to 'domcontainer' + selectorSeparator

WebAutomation.LaunchFirefox \
    Url: "https://www.startpage.com" \
    WindowState:WebAutomation.BrowserWindowState.Maximized \
    ClearCache:False \
    ClearCookies:False BrowserInstance=> Browser
   
WebAutomation.FormFilling.PopulateTextField \
    BrowserInstance:  Browser \
    Control: webSelector + ' input[id="query"]' \
    Text: 'robin-language.org' \
    EmulateTyping:True \
    UnfocusAfterPopulate:False

Regards,
burque505

2 Likes

Update: It appears that UiAutomation selectors can still be assembled as well, provided the following appears as the first element of the assembled component, a sort of “automation prefix”:

':desktop > '

Thus, the following code also works, with a control selector that is not in and of itself a variable, but rather concatenates an automation prefix with an existing variable, which in turn is assembled from other variables. Note the interpolation.

interpolation

I hope this is actually of some help, rather than generating confusion. :grinning:

Regards,
burque505

2 Likes