9 hours ago
Hi, CSS selector seems to give different results than Web Class Attribute in Application Modeler.
Here's an example:
Trying to select highlighted element of a page:
This works fine when I'm using Web Class and Match Index Attributes:
(there are multiple elements with this class on this page, but above gives me a match),
but using the same as CSS Selector returns no founds:
Same story when I'm using CSS selector without Match Index:
When I use just this CSS Selector:
I'll get a match (sth is found, it's not highlighted though). Above returns no error message (which would indicate that just 1 element with .rnvToggle.radIcon class exists in this page).
Am I missing something? Are CSS selectors only partially supported, or it's some bug I'm facing?
I'm using BP 7.2.0.5997 x64
Here's the reference to page I'm using, you can switch to English in this button:
Statistics Poland - Local Data Bank
8 hours ago
Apologies for first screen - I've selected different element, than I'm referring to later on, but I hope my question is clear (can't edit it now).
8 hours ago - last edited 7 hours ago
Hello,
You can use the xpath in this scenario.
for example this expression will choose the Metadata list
//span[@class='rnvText' and text()='METADATA']
in addition to this, with xpath you can use the indexing method for example if you have 19 element in the browser (see below) with this xpath expression //div[@role='listitem']
you can use the first one with this expression (//div[@role='listitem'])[1]
With Xpath you can also choose an element with the text name example :
to choose xpath inside blue prism in application modeller tick this
7 hours ago
With CSS i have 4 elements
With xpath i can filter by indexing
or easiest like this //span[@class="rnvText" and text()='METADANE']
7 hours ago
Adding to @Mohamad_747, XPath is really the best solution for what you are looking for. One of the advantages over CSS Selectors is that you can traverse backwards (which comes in handy more than you would believe). For your element, you can use the text of it's child to select the element:
//span[text()='METADANE']/parent::span