Hi Simon,
I too have a button on a page which is of a "type" submit.
I'm testing the Accessibility feature of the page and was trying to perform all actions on the page using keyboard.
I need to click on the button. below is the code m using:
pressKey(page, Keys.RETURN);
or
pressKey(page, Keys.ENTER);
/**
*
* @param page
* @param enter
*/
public void pressKey(WebPage rPage, Keys ...keys) {
Actions action = new Actions(rPage.getDriver());
for(Keys key : keys){
action.sendKeys(key);
}
action.build();
Action selectMultiple = action.build();
selectMultiple.perform();
}
Both the approaches are not working. Can you please help. event sendkeys("\n") didn't work
here's the Html:
<input id="but_Default Button Id" name="" value="Continue" type="submit">