AirtestProject / AirtestProject/Airtest

shell('input text') doesn't work as it should

Open
#1,047 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
9.6k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I input text in field with command "shell('input text ' + randomId)". Sometimes this command input only digits or part of string
randomId = ''.join(random.choices(string.ascii_lowercase + string.digits, k = 10))

**python version:** `python3.8.5`

**airtest version:** `1.2.13`

**Smartphone (please complete the following information):**
- Emulator: any model

My code:
```
while errorNotice:
randomId = ''.join(random.choices(string.ascii_lowercase + string.digits, k = 10))
poco("android.widget.ListView").child("android.view.View")[0].click()
keyevent('KEYCODE_MOVE_END')
ContinuousKeyevent(10, 'KEYCODE_DEL')
shell('input text ' + randomId)
text(randomId, False)
keyevent('TAB')
if not poco("errorNotice").exists():
errorNotice = True
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.