尝试在Python中运行
driver.get("myWebite")
element = driver.find_element_by_class_name('artist-name')
print(element)
我期望的答案是“鲍伊”,但返回的是
<selenium.webdriver.remote.webelement.WebElement (session="23123aef156e1f8c358126ba5b6e2974", element="16198427-753f-4293-b9ee-df1826309113")>
答案 0 :(得分:0)
driver.get("myWebite")
element = driver.find_element_by_class_name('artist-name')
print(element.text)