Selenium Python – Finding Elements by Class Name With Spaces

Those are multiple classes, not a single class with spaces, just use all the classes together.

driver.find_element(By.CSS_SELECTOR, '.class1.class2.class3')

In CSS selector a dot . is a class, you can concatenate any number class names

Leave a Comment