appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.21k stars 756 forks source link

can't sendKey in alert popup #529

Open romainlouvet opened 7 years ago

romainlouvet commented 7 years ago

Description

When try to sendKey on alert popup

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

image1

Environment

Link to Appium logs

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

TikhomirovSergey commented 7 years ago

@SrinivasanTarget could you take a look at this ticket?

babusurendra commented 7 years ago

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?

babusurendra commented 7 years ago

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 :)

SrinivasanTarget commented 7 years ago

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

babusurendra commented 7 years ago

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

Prakash-Saravanan commented 7 years ago

@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.
babusurendra commented 7 years ago

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?

Prakash-Saravanan commented 7 years ago

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

babusurendra commented 7 years ago

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