droefs / HLISA

A reimplementation of the Selenium API, emulating human interactions
https://pypi.org/project/HLISA/
GNU General Public License v3.0
72 stars 8 forks source link

`@` not being typed when using `.send_keys` #20

Closed kvsxxx closed 2 years ago

kvsxxx commented 2 years ago

I want an email to be typed into a textbox and everything works apart from the @ sign.

Simple example

actions = HLISA_ActionChains(driver)
actions.send_keys('some@mail.com').perform() # somemail.com will be typed into the textfield

Oh and by the way, thank you very much for creating this libary, it's really useful!

droefs commented 2 years ago

Thank you for reporting this interesting issue!

Unfortunately I cannot replicate the issue, neither for Selenium 3.141.0 nor for selenium 4.2.0 with Firefox.

Does this problem also happen when sending capitals (`actions.send_keys('Some@Mail.com')? If so, it somehow might not be possible for your selenium/browser/OS combination to hold down two or more buttons at the same time. If that is the case, I can add a flag for an exception which will solve the issue, but this will make the typing considerably less human like.

If typing capitals is also not possible, you can probably use key_down() and key_up() as a temporary workaround (which also won't look human like):

actions = HLISA_ActionChains(driver)
actions.send_keys('some').key_down('@').key_up('@').send_keys('mail.com').perform() # somemail.com will be typed into the textfield

If you can give some information that can help me to replicate the issue (OS, browser version, selenium version) I might be able to solve the issue while preserving human like behavior.

kvsxxx commented 2 years ago

I have no idea why but it seems that the issue was resolved for me, thank you for your time!

droefs commented 2 years ago

Thank you for letting us know!