Send keys sometimes pastes clipboard contents

I am trying to use send keys to fill in an email field and it works the majority of the time. However, about 1/3 or 1/4 of the time instead of just posting the send keys text, it instead seems to trigger a long key press by pulling up the paste prompt and then pasting whatever is on the clipboard and then posts the text.

For example:

WebElement myElement = driver.find(“email”); myElement.sendKeys(“My text”);

Android clipboard text: “This is some clipboard text”

Resulting input field: “This is some clipboard textMy text”

This happens much more frequently on the email field instead of the password field. To the point where I’ve seen it about 20 times on the email field and only once on the password field, suggesting this may be some kind of timing issue. I have tried to click the element to try and cancel out the prompt when it does happen, but that click always occurs before the prompt ever comes up. Can anyone help me out with this issue?

1 Like

Only appium serverlogs can help…