Skip to main content
Ashton
Contributor ⭐️⭐️⭐️⭐️
Aug 10, 2023 1:39 PM UTC
Current Behaviour

Product Mapper UI Element Rule Wildcards

Related products:PX Product Mapper

Similar to how Product Mapper URL rules have wildcards it would be nice to have wildcards for UI Element rules. When evaluating the selector it might be such that a UI object has a dynamically created ID and we would want to capture any of the objects of this type. 

Example image showing where we would use the wildcard.

 

 

 

3 replies

broghanzwack
Contributor ⭐️⭐️⭐️⭐️⭐️
Aug 10, 2023 6:19 PM UTC

Hi @Ashton! You can actually do this now with a slight syntax adjustment.  
 

Let’s say you’ve got an href that looks like this: [href=”https://www.nytimes.com/crosswords/game/daily/2023/08/10”]. If you want to build a rule for any link that contains text from that URL, you can simply add a * to the attribute name. In this case, we end up with [href*=”/crosswords/game/daily/”], which means ‘URL contains /crossword/game/daily’. 

 

This W3 article shares a couple other ways to manipulate attributes in CSS selectors.  

Translate
broghanzwack
Contributor ⭐️⭐️⭐️⭐️⭐️
Aug 10, 2023 6:19 PM UTC
No Status→Workaround Available
Translate
Contributor ⭐️
Mar 7, 2024 7:25 PM UTC

I’ve attempted this with a feature that looks like this:

The UI Element was changed to : 
[href*="/Folder/FolderProperties.aspx?FolderID"] > .buttonContent  This does not seem to have worked. Any ideas?

Translate