Skip to content Skip to sidebar Skip to footer

Selenium Find Element By Class Name Doesn't Work

I just started learning selenium so when I tried do get something from https://www.python.org/ with find_element_by_class_name('small-widget get-started-widget') it didn't work eve

Solution 1:

The element with this class name does not exist, so the class name is wrong. I think because of the whitespace at the class name. Try this:

element = driver.find_element_by_class_name("small-widget.get-started-widget")

Post a Comment for "Selenium Find Element By Class Name Doesn't Work"