Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver import ActionChains
- from selenium.webdriver.common.by import By
- from selenium.webdriver.common.keys import Keys
- from selenium.common.exceptions import NoSuchElementException
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.support import expected_conditions as EC
- driver = webdriver.Chrome(executable_path=r'C:\ChromeDriver\chromedriver.exe')
- driver.get("https://login.imagesilo.com/Home/Login")
- wait = WebDriverWait(driver, 10)
- search_input = wait.until(EC.presence_of_element_located((By.ID, "txtPassword")))
- search_input2 = wait.until(EC.presence_of_element_located((By.ID, "txtUserName")))
- cmd = "document.getElementById('txtUserName').value='2';"
- driver.execute_script(cmd)
- elemental=driver.find_element_by_id("txtPassword")
- driver.execute_script("arguments[0].value = 'karp1';", elemental)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement