-
-
Notifications
You must be signed in to change notification settings - Fork 335
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Checklist before reporting
- I have searched for similar issues and didn't find a duplicate.
- I have updated to the latest version of pydoll to verify the issue still exists.
pydoll Version
2.12.4
Python Version
3.12
Operating System
Linux
Bug Description
When I use type_text feature on input field, it jumbles up characters after a certain number of characters are written. The cursor keeps moving back after typing 22 characters. So whatever you write afterwards, it gets written backwards.
The bug is persistent even after using different cursor speeds.
Steps to Reproduce
- Import library using pydoll
- Setup browser with Chrome
- Run the Chrome in headed mode
- Find a field or element where you can enter text such as input fields (Email, URLs, simple text) and store it in a variable, e.g.,
tag = tab.find(tag_name='tag_name')
- Use type_text method on the variable, e.g.,
tag.type_text(
'Some text',
interval=0.2
)
or
for i, char in enumerate(TEXT):
await email.type_text(char, interval=0.2)
- Run the program and see the error
Code Example
import pydoll
import asyncio
TEXT = 'Some text to try out'
options = ChromiumOptions()
async with Chrome(options=options) as browser:
tab = await browser.start()
await tab.enable_network_events()
await tab.go_to(BASE_URL)
text_input = await tab.find(id="text_field")
await text_input.click(
x_offset=1,
y_offset=2
)
await asyncio.sleep(2)
for i, char in enumerate(TEXT):
await text_input.type_text(char, interval=0.2) # will run but characters will jumble from end
await text_input.type_text(TEXT, interval=0.2) # Same issue. With high cursor speed, it omits the first characters sometimes tooExpected Behavior
If I want to type some text, it shouldn't get jumbled up after a certain number of characters
Actual Behavior
If you use a variable with value "[email protected]', it types '[email protected]'
Relevant Log Output
Additional Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working