Aakash Singh
Aakash Singh

Reputation: 57

How to click Search key on the keyboard of an ios device to automate a webapp using selenium?

Application Type: Web App

Device: IOS(iPAD)

Browser: Safari

I am trying to search a incident in the search box but the only option I can do it is by clicking the 'Search' key on the keyboard after entering incident id. I am able to enter the incident id using sendkeys() but not getting how to click the 'Search' key on the keyboard.

I have tried the below things for this:

1.  SEARCHBOX.sendKeys(Keys.chord(Keys.ENTER));

2.  SEARCHBOX.sendKeys(Keys.chord(Keys.RETURN));

3.  SEARCHBOX.sendKeys("\n");

4.  SEARCHBOX.sendKeys(Keys.ENTER);

5.  Robot r = new Robot();
    r.keyPress(KeyEvent.VK_ENTER);

but non of them worked.

Upvotes: 2

Views: 2063

Answers (1)

Ramya
Ramya

Reputation: 36

driver.getKeyboard().sendKeys(Keys.RETURN);

Upvotes: 2

Related Questions