GOAL: Print "Eden Ivy" onto my console.
I am following the documentation for Selenium Webdriver.
The following is the line of interest. Here is the screenshot:
HTML:
<a href="/model/77291/eden-ivy" title="Eden Ivy" class="sc-1b6bgon-7 cGUerq">Eden Ivy</a>
How exactly do I grab and print "Eden Ivy" ?
I tried:
name = driver.find_element_by_class_name('sc-1b6bgon')
print(name)
and
name = driver.find_element_by_class_name('sc-1b6bgon-7 cGUerq')
print(name)
But they don't seem to be working. What am I doing wrong?
Edit: I can't use the words "Eden Ivy" when grabbing, it has to be by element. So that I can use this function for other names.