0

I am trying to achieve a script to auto-fill the information on a website but turns out the website randomly mixes up the order of the string of number I entered. For example, if I enter '1234567' with send_keys(), it might appear to be '4567123'.

I figured that I might be possible to use copy and paste to directly put these numbers in without being interrupted by this feature of the website.

Could anyone please help me to figure out how to make copy the string ('1234567') and paste to the place I wanna fill please?

The language I am using is python and browser is Chrome

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Edison Hua
  • 39
  • 1
  • 5
  • Does this behavior also occur when you visit the website manually? Are you sure this isn't the result of a bug in your code? – Bill Mar 09 '17 at 04:51
  • If I do it manually, copying and pasting work perfectly. It's not a bug, it's the website designed to fight the send_keys() or whatever the bot_behavior does. – Edison Hua Mar 09 '17 at 04:58
  • Well, I think you're going to have a problem loading data to the clipboard. I did a cursory search and it looks like there are libraries that may work. Unless you can find a text box you can write cleanly to. Then you can follow [this](http://stackoverflow.com/questions/11750447/performing-a-copy-and-paste-with-selenium-2). – Bill Mar 09 '17 at 05:08
  • Possible duplicate of [Performing a copy and paste with Selenium 2](http://stackoverflow.com/questions/11750447/performing-a-copy-and-paste-with-selenium-2) – Bill Mar 09 '17 at 05:08
  • It seems like 'clip' is not valid on OSX. Is that me or everyone else? – Edison Hua Mar 09 '17 at 05:40

0 Answers0