Skip to content
Advertisement

Selenium select specific content with OR/AND operators – python

I am struggling with a problem in Selenium using Python.

This is a dummy draft of what I have.

JavaScript

My target is to select the button that has info="content1" and aria-label="2"

I have already tried

JavaScript

But doesn’t work and returns NoSuchElementException

Would you please help me?

Advertisement

Answer

Simply put the two bracketed attribute selectors next to each other with no and:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement