I'm trying to locate an element by class name. This is an excerpt from the page source (saved to a file using BeautifulSoup):
<div class="flex flex-column"><div
...
If I try to find this element like so:
element = browser.find_element_by_class_name("flex flex-column")
It raises an exception:
Message: no such element: Unable to locate element: {"method":"css selector","selector":".flex flex-column"}
But doing
element = browser.find_element_by_class_name("flex-column")
finds the element (there is only one flex-column).
Why does the error message say "selector":".flex flex-column"
? Where does that period come from? And how do I know what the correct name of an element is? I'm only using the inspection tool in Firefox to find class names.
Also, how would I search for an element like this one?:
<span class="absolute w-20 h-20 rounded flex justify-center items-center transition marker-wrapper border border-gray-3 group-hover:border-primary-4 bg-gray-6">