Selenium.WebDriver is trying to access the HTML source of the Web element

Asked 2 years ago, Updated 2 years ago, 94 views

I'm using Python binding to spin the Selenium web driver.

from selenium import webdriver
wd = webdriver.Firefox()

Here

I know this much, but I still don't know how to view the element source.

lem.source # <-- return HTML in string format

I'm looking for a Python selenium webdriver document, but I don't know if I can't find it or not, but I don't know anyway.

Help me.

python selenium webdriver selenium-webdrive

2022-09-22 22:12

1 Answers

Read innerHTML to access the element/outerHTML content (content) source of the current element. Depending on the language

element.get_attribute('innerHTML')
elem.getAttribute("innerHTML");
element.GetAttribute("innerHTML");
element.attribute("innerHTML")


2022-09-22 22:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.