p_elem = driver.find_element_by_xpath("/html[1]/body[1]/div[1]/div[2]/div[1]/div[1]/div[3]/div/img")
data = p_elem.text
print (data)
driver.quit()
I want to print urls, which is the img value of the webtoon div attribute, but only the window turns on and off, and nothing works. I can't find it no matter how much I look for it, and I don't know how to print properties with selenium... Help me
python selenium
p_elem.getAttribute("src")
You can obtain attributes by using the getAttribute method for elements received from the find.
Additional
Try find_element_by_xpath instead of find_element_by_xpath that you used in the text.
© 2024 OneMinuteCode. All rights reserved.