Is it possible to get Selenium to match multiple class names?
For example:
driver.find_elements_by_class_name('image' or 'image-large')
Thanks
Is it possible to get Selenium to match multiple class names?
For example:
driver.find_elements_by_class_name('image' or 'image-large')
Thanks
In CSS you would do .image, .image-large
to match elements that have either image
class or image-large
class.
And Selenium has a CSS selector method:
driver.find_elements_by_css_selector('.image, .image-large')