Gmatmut
Gmatmut

Reputation: 21

UiPath selector not working in 'Click Button' Activity

I have the version of UiPath Studio Pro 2020.10.6, and I used Chrome.

I can't find the common Selector on two pages:

The selectors offered by the tool are the following:

Case 1:

<html app='chrome.exe' title='Sephora X Coach - Palette de fards à paupières Rexy de SEPHORA COLLECTION ≡ SEPHORA' />
<webctrl id='add-to-cart' tag='BUTTON' type='submit' />

Case 2:

<html app='chrome.exe' title='Kit maquillage des yeux de SEPHORA COLLECTION ≡ SEPHORA' />
<webctrl id='add-all-to-cart' tag='BUTTON' type='submit' />

Removing the title tag does not solve the problem. The use of wild-cards does not work. see here

I looked via the "Fuzzy Search":https://docs.uipath.com/studio/docs/fuzzy-search-capabilities I did the test in Python of the script of the page for the first case: https://www.datacamp.com/community/tutorials/fuzzy-string-python The result is like in the picture above:see here But it's not working too for the first case, since I put the level at 0.1

<html app='chrome.exe' title='"+SelectorString+ "' matching:title='fuzzy' fuzzylevel:title='0.3'  /><webctrl id='add-all-to-cart' tag='BUTTON' type='submit' />

with

SelectorString = "Sephora X Coach"

I have no more idea, is the fact that in my first case the button is in a form (when looking at the code of the HTML page) and not in the second case? Thank you in advance for your help.

Upvotes: 1

Views: 3977

Answers (1)

Gmatmut
Gmatmut

Reputation: 21

I find the solution, I change the selector like that:

<html app='chrome.exe' />
<webctrl id='add[-all]*-to-cart' matching:id='regex' tag='BUTTON' type='submit' />

Upvotes: 1

Related Questions