Unable to send text value to the edit box

Hi All…
I have an issue on sending value to the edit text box where the value is not entering somtimes and most of the time the edit box would be selected but text values is not passing at all… i haven’t observed this kind of issues before… i have attached screen shot for the same … please let me know if you have experienced this kind of issue… and any solution …

i tried clear method just for a try … but it didn’t work…
Appreciate dfor the help
Thanks

Can you provide the code that you tried?

I use classname to interact with android edit texts, so my C# is

driver.findelements(By.ClassName("android.widget.EditText).ElementAt(4).SendKeys(“testvalue”);

Hey @kcinman11358

Thanks for your replay… that now got fixed … i have another intermittent issue on closing keyboard which popup usually while sending text data to the text field… so i closing the keyboard after each text edit field in order to make other text input box visible. with
driver.pressKeyCode(AndroidKeyCode.BACK);
. but sometimes the keyboard doesn’t popup but keyvalue will be passed … when the above method triggered app would switch back … so what would be the solution to close the keybaord only if it has pop up…

Appreciate for your help

Thanks

You might try:

public static void hideKeyboard(AppiumDriver driver) throws Exception {
    try {
        driver.hideKeyboard();
    } catch (Exception e) {
        //Lets ignore, apparently its throwing exception when keyboard was not opened
    }
}

Hi @Telmo_Cardoso

Thanks for your replay… it got fixed… anyway… i am facing another issue in instantiate MobileCapabilityType as

MobileCapabilityType cap1 = new MobileCapabilityType();

let me know please is there any solution…
Thanks

MobileCapabilityType is an interface that extends CapabilityType, if you want to use it, do:

capabilities.setCapability(MobileCapabilityType.UDID, device.getDeviceId());

Thank you @Telmo_Cardoso… got it…