Kmanc
Kmanc

Reputation: 359

Python to view and manipulate web page

I want to use Python to edit an element on a webpage. I've been trying to figure out how to use selenium to do that. Right now, this is what I have so far...

driver = webdriver.Chrome()
driver.get('https://www.website.com')
elem = driver.find_element_by_id('id')
print(elem)

Reading through the documentation (http://selenium-python.readthedocs.io/getting-started.html) I noticed they do the following

elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)

But I'm a little confused...is that changing the id name? I want to change a different aspect of the element I find. If you could point me in the right direction, or help me print out something more useful than elem (typical output looks like this (session="8428be97c843ee6fecc9038bceccbc0e", element="0.0761228464802568-1")), I'd really appreciate it!

Upvotes: 0

Views: 936

Answers (1)

Tomek B.
Tomek B.

Reputation: 145

Selenium isn't a tool to edit elements on website. It used commonly to automate tests imitating user behavior on website.

Upvotes: 2

Related Questions