Hi everyone, I’m migrating one of my bots from IE to Chrome so I’m having to change a lot of selectors.
Part of this bot functionality is to answer a short form based on the data present in the payload we send to it.
The problem comes when for one of these questions, the selector is not working. And what’s even weird, I already did this for my other bot and it’s working 100% fine (they use the same platform and answer the same form).
This is the question that it has to answer:
This is the selector I’m using to answer ‘United States of America’ to this same question in my already migrated bot:
<html app='chrome.exe' title='Acceptance and Continuance' />
<webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' />
<webctrl tag='P' aaname='*United States of America*' />
<webctrl tag='INPUT' />
I’m currently using:
UiPath.System.Activities - v20.4.0
UiPath.UIAutomation.Activities - v18.4.5
The only alternative I found is to use ID-based selectors, but this isn’t enough since the ID of the elements in the webpage is dynamic so I have to adjust it very often.
Do you have any idea of why this is happening or how could I solve this problem?
Do you have selctor not found exception? If so,did you already identify which selector element is wrong? if not, can you try to check it one by one as the following, using Validation button and highlight button in Selector editor?
First
<html app='chrome.exe' title='Acceptance and Continuance' />
If it’s good, next
<html app='chrome.exe' title='Acceptance and Continuance' />
<webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' />
Next
<html app='chrome.exe' title='Acceptance and Continuance' />
<webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' />
<webctrl tag='P' aaname='*United States of America*' />
Finally
<html app='chrome.exe' title='Acceptance and Continuance' />
<webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' />
<webctrl tag='P' aaname='*United States of America*' />
<webctrl tag='INPUT' />
Please try to use Ui Explorer to check any of the button both in Chrome and in IE. If you a comparison between the valid selector which you are getting for IE and Chrome for an element, you can compare the similarities.
Surely it will give an insight to the changes required.
<html title='Acceptance and Continuance' />
<webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' />
<webctrl tag='P' aaname='*United States of America*' />
<webctrl tag='INPUT' />
And it’s correctly selecting the radio button.
For most of the selectors to work in Chrome when I was doing the migration I just had to add the tag app=‘chrome.exe’ to the part and it would work.
That’s exactly what I did when I was migrating my other bot and it’s working fine, but now I want to do the same with this one and I’m getting this problem.
If I try to use ‘Indicate element’ function of the Click activity, the selector that I get is this one:
In that case, <webctrl tag='DIV' aaname='*United States of America*Argentina*' class='aq' /> or similar selector exists in the middle of center lane. We need to find difference between ie and chrome.