I have a process which logs into a platform to upload documents. However after logging in my click selector will sometimes not work as the server name will change in the selector causing the bot to not work.
Under edit selector it shows:
The CANTONMENT is the server name and will change between the 3 servers.
As the selector is failing sometimes as the server name changes, you could see if you can incorporate any one of these approaches to tackle the issue:
In the selector, try to pass the variable data which contains the name of the server accordingly. Modify the selector to be adaptable with the variable data like this:
<wnd app='chrome.exe' cls='Chrome_WidgetWin_1' title='How do I solve the issue of server name changing in selector? - *' />
<ctrl name='Sample' server='{{delData}}' />
If the above approach doesn’t make any sense as per your use case, try incorporating the wildcard (* in your case) in the selector to make it server neutral.
<wnd app='chrome.exe' cls='Chrome_WidgetWin_1' title='How do I solve the issue of server name changing in selector? - *' />
<ctrl name='Sample' server='*' />
> <html app='msedge.exe' title='[*] CROSS - Home - User Role = SSUP' />
> <webctrl src='/cross/MainMenu.jsp' tag='FRAME' />
> <webctrl name='but9' tag='IMG' />
It would look like this.
But the selector does not get validated for all my clicks and some will still show validation error.