About a html button tag that there is a space character before and after a content text of the tag

Hi Everyone,
I’m trying to work on a project to operate some web pages.
So, in some pages there are button tags that there is a space character before and after a content of the tag.
For exsample a space character and button name and a space character, " Click02 ".
attached buttonTagElement1.html
buttonTagElement1.html (336 バイト)

attached a screenshot on IE browser.

So in the case of IE browser with UI Exploer, trimmed contents are acquired in aaname.
attatched a screenshot on this operation.

But in the case of Firefox or Chrome, no trimmed contents are acquired in aaname.
attatched a screenshot on this operation.

I’d like to create a flow chart with only one kind, not two kinds. Who knows something nice way to avoid this difference depending on the browser type?

@patent-atanaka
you dont have to write 2 separate selectors. Use wild characters to match both the scenarios.

Capture

‘*’ in the selector replaces zero or more characters
To know more about Wild Characters in UiPath, refer,

1 Like

Thanks @Madhavi !

My pleasure.
Hope it helped.

However, if we have a 1 more button with aaname = “1 Click02” in the same page and I want the bot to click the button with aaname = “Click02”. In this case the bot will click the incorrect button. I am facing this problem using * in the aaname.

The spaces before and after the aaname in my case are not constant. How should I deal with this scenario?

1 Like

Use reference of parent elements also and make the selector unique.

1 Like