简体   繁体   中英

python Selenium SendKeys() issue for sending “-” key

I am using selenium to automate form auto-fill option on example.com

but what i see is, selenium send_keys() is not sending all the characters to browser

input to send_keys() function is : תל אביב -יפו and

what selenium writes to browser page is : תל אביב יפו

it omits the dash(-) from string

can someone point me to the right direction as to how can i have selenium to send all the characters to browser

element.clear()
element.send_keys(u'תל אביב -יפו')

this is what keys_to_typing generates as input to Command.SEND_KEYS_TO_ELEMENT

[u'\u05ea', u'\u05dc', u' ', u'\u05d0', u'\u05d1', u'\u05d9', u'\u05d1', u' ', u'-', u'\u05d9', u'\u05e4', u'\u05d5']
  • Issue is specific to website i am working with..
  • could not find specific solution to the problem
  • I have implemented a work around which selects the correct value from suggestion box

Try to remove all your keyboards but the English one and then try again. I've had the same problem and this worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM