BackstopJS icon indicating copy to clipboard operation
BackstopJS copied to clipboard

How to trigger multiple items with the same class?

Open golddragon007 opened this issue 4 years ago • 1 comments

I have a specific class that appears multiple times on the page (i.e. dropdown containers) and I want to open all. As far as I noticed the querySelector is used because only the first occurrence is being triggered. Is there a way to trigger multiple ones? (ie instead of querySelector use querySelectorAll, or always use the second and if I need an item I can specify with :nth-child(X))

golddragon007 avatar Feb 12 '21 17:02 golddragon007

https://github.com/garris/BackstopJS#selectorexpansion

I think this is what you are looking for.

masi avatar May 17 '21 18:05 masi