osx - Selenium WebDriver Python: How to stop 'send_keys' from hitting return after sending a string -


I am trying to sign a website on twitter, and to enter Twitter login information, I The method "elem.send_keys" ("user name") in Selenium WebDriver

method is also entered after 'sending' the string, which is a problem because it causes the entry form to be submitted Before I entered the password, and refresh the page, then Take entered is deleted username, stop logging.

How do I send a key without logging in, which is being deposited later? Thank you.

Python: 3.4.1, Selenium: 2.42.1, OS: Mac OSX 10.9.4

Edit:

This is the way I like in the browser Write all interactions with elements, wrapped in an attempt / except to prevent StaleElementReference errors:

  found = not found: try: enter: enterPassword = driver.find_element_by_id ("password ") EnterPassword   

" text ">

Can you test that it submits at your end? (This is not mine)

  selenium import web driver driver browser = driver. Firefox () browser.get ("http://www.google.com") Note the print browser one side: Elements should be done with a clear waiting waiting to be present.  
  
  code> Selenium.webderier.expected expected to import from IC. Waiting = WebDriverWight (driver, 10) element = wait. Finally (ECPresence_of_Allement_Located ((by ID, 'some ADID'))  


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -