Java-client: can't sendKey in alert popup

Created on 1 Dec 2016  路  9Comments  路  Source: appium/java-client

Description

When try to sendKey on alert popup

Test code :
Alert alert = getDriver().switchTo().alert();
alert.sendKeys("hello");

image1

Environment

  • java client build version : 4.1.2
  • Appium server version : 1.6.1
  • Mobile platform/version under test: iPhone 7 iOS 10.1 / Xcode 8.1
  • Real device

Link to Appium logs

Bad parameters: BadParametersError: Parameters were incorrect. We wanted {"required":["text"]} and you sent ["value"]

bug server side

All 9 comments

@SrinivasanTarget could you take a look at this ticket?

Hi @SrinivasanTarget i have the same issue ,both sendkeys and setvalue are not working , as it already reported as bug, is there any update on this?

sorry @SrinivasanTarget i missed the above comment i will follow the issue here https://github.com/appium/appium/issues/7245#issuecomment-262104894 , please update if you have any other update on this here :)

Yeah I did noticed it. Looks like a server side issue.

@SrinivasanTarget ,so is there any work around exist for this ?

@babusurendra as a workaround,

  1. Tap on the text box by driver.tap or by TouchActions.tap either by using the element or its coordinates.
  2. Now the keyboard will be displayed
  3. driver.getKeyboard().sendKeys() should work.

Hi @Prakash-Saravanan thanks for the update here!
when I tried the above method which you have provided seeing the following error in ruby
undefined method `getKeyboard' for #
can you advise on this?

@babusurendra That was for Java. I don't have idea about ruby

okay, I will check in ruby. thanks, @Prakash-Saravanan :)

Was this page helpful?
0 / 5 - 0 ratings