python selenium clear input code example
Example 1: python selenium clear input
driver.find_element_by_id('foo').clear()
Example 2: selenium python get innerhtml
element = driver.find_element_by_xpath('//*')
element = element.get_attribute('innerHTML')
Example 3: fill form selenium python
driver.find_element_by_xpath(username_input).send_keys(“username”)driver.find_element_by_xpath(password_input).send_keys(“password”)driver.find_element_by_xpath(login_submit).click()
Example 4: how to get text of a tag in selenium python
element.text