How to use .setText from AppiumDriver instead of .sendKeys from WendDriver or AndroidDriver?

As I am facing problem with slowness of sendKeys method in WebDriver while entering data into text fields on Android UI(on both Simulator and Real Device)…

Please Suggest some alternative ways to insert values into text fields.


You can make text insertion faster by setting sendKeyStrategy to either “grouped” or “setValue” or alternatively cast your WebElement to MobileElement and call setValue method

1 Like

Can you please send code snippet for the same. :blush:

Currently I am using ::

I need to follow same lines of code for many other text field components which takes too much time. :frowning:

I am using Selenium WebDriver and Appium.

Please Help.

Try this instead:

((MobileElement) webDrvr.findElement(“”))).setValue(“1600”)

Hello vladisx,
Here is my code::
((MobileElement) webDrvr.findElement(“”))).setValue(“7”);

I am getting Error As::
On Eclipse====> Not yet implemented. Please help us: (WARNING: The server did not provide any stacktrace information).

On Cnosole=====> Responding to a Client that a Method is not implemented.

…And I think ERROR is At SECOND Line… :frowning:
Please Help ASAP.


Sorry, I was wrong - setValue it’s iOS only function and it’s not implemented for Android according to this issue



Thanks for your Time… :blush:

I use a combination of clear and type. e.g.

element = find_element(:id, ID)
element.type data

It’s relatively zippy

Is there “.type()” method available in any of Driver class out of WebDriver,AppiumDriver,AndroidDriver.

BTW I am actually facing problem of slowness with sendKeys method to enter text.

Please Help.

In Python you can try this: ‘set_value’ is really helpful, tested and working in iOS

element = self.driver.find_element(*CreateanAccountLocators._FIRST_NAME_ID)

I use appium only with page source code and for Android and Ios devices.

To edit text, I apply click action (with touchAction) on targeted edit text and after I use directly Driver sendKeys option :

PS: the Driver is = “AppiumDriver<MobileElement>.”

1 Like

Dear All,

When i am using .sendkeys in appium it triggers “paste” as well. Can anyone please help me the workaround for this. I am getting stuck due to this.

Faizan Farooq Mamji

Thank you…It’s working

I am facing problem in sendkeys where appium is not responding the function of sendkeys instead it is performing click and the keyboard is getting pop up on the text field element

MobileElement email = driver.findElement(By. id (“ID”));


Thread. sleep (1000);

Is there any method to get the keys as return for the validation purpose that are sent through input ?