I have no idea why this code does not work properly. This program is for automatically locating respective fields of username, password, and enter some data for the tweet to be sent. I am selecting the elements of the page correctly, but not able to enter data into it and get a
NoSuchElement
Exception .
from selenium import webdriver
import time
import os
import selenium
chromedriver = "mypathto/chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver)
driver.get('https://twitter.com/login')
username = driver.find_element_by_name("session[username_or_email]")
password= driver.find_element_by_name("session[password]")
username.send_keys("myusername")
password.send_keys("password")
submit = driver.find_element_by_class_name("submit EdgeButton EdgeButton--primary EdgeButtom--medium")
submit.click()
autotw1= driver.find_element_by_id('tweet-box-home-timeline')
autotw1.send_keys("""Just a testing """)
print "Tweet probably sent"
driver.save_screenshot("mybotfunc.png")
why this code does not work properlywhere are you exactly stuck?