I an automating android native app
and for eg.in login page I want to copy email id using long tap and select copy option from context
and want to paste into password field ?
How to automate this scenario using appium ?
1.Long tap gesture
2.Select all the text in that textbox field
3.Use context copy menu
4.Use long tap on password field
5.Try to paste again using long tap and context paste option
Hi @Degard , Actually my requirement for application says that You can not paste anything in password field on login page, So I want to know
1.Whether I can copy password field text or not ? gettext doesn’t work in password field
2.Whether I can paste any text copied from any other field into password field or not ? since gettext will always copy the text to variable and sendkeys will paste that into my password field but requirement says long tap copy/paste option should be disabled for password field so I want to automate this requirement
If you long press on a text field, the Paste menu appears and that cannot be identified.
There is workaround for that, it may sound silly but works fine. Below are the steps
type a dummy text in the text field. (Note.: it should be long enough to cover more than half of the text field width)
Find the center of the text field and use long press with location coordinates
Now the action bar appears with Cut / copy / paste options which are identifiable