How to send ENTER key in protractor tests on iOS? -
i'm using protractorjs (and appium) test website on browsers , devices. 1 of tests type text in search box , hit enter. here snippet page object.
page.searchinput.sendkeys("text"); page.searchinput.sendkeys(protractor.key.enter);
the above 2 lines work fine on browser , android devices. however, same test fails on ios because enter key not sent. in ios keyboard key have press "search" one.
the test must trigger search using keyboard.
any ideas on how send enter key on ios?
if there no button on page, safari stubborn , not submit form. in general, use button tag instead of input tag , have better results, either way unless there submit button on page, , button visible (see question reference: how submit form when return key pressed?), safari stubbornly refuse submit page. in case, put submit button on page though users never use on mobile. may have fits getting past design department. other option use blur event , trigger way.
Comments
Post a Comment