Selector precision: Ignoring classes

Modified on Mon, 06 Feb 2023 at 04:33 PM

When choosing which attributes to use to find a page element, you could find classes that change over time (e.g. when the page is reloaded, when another user signs in).


In cases like this, the most convenient thing to do is to exclude those classes from the element selection (from both class selector and CSS selector) by default.


 

In order to set up which classes are not trustworthy, you need to go to Newired Portal. From there, click on Settings and select Site Settings.



From here, you can choose to trust all classes, not to trust any classes or to trust all classes with some exceptions that you can define.

 


Let’s explain this last option further. In case you know which classes are dynamic, you can type the prefix a class needs to have in order to be excluded from the Selection attributes.


To do that, type <CLASS NAME>.* in the field shown in the image below.


If you have listed some classes to exclude in the Site Settings, when selecting attributes from the Selector Precision, those classes will be hidden and unchecked by default. By selecting Advanced, you’ll be able to just see (not check) the excluded classes.


Also, by enabling advanced features, the CSS selector will warn the user if they are using some of the not reliable classes in the CSS.


 



 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article