Not able to use keyPress
I have one flash video site to be automated and when clicked on full screen element , video is displayed in full screen.
I want to go back to normal view with ESCAPE keyboard event,
But it does not working browser.actions().keyPress(protractor.Key.ESCAPE).perform();
It throws an error like TypeError: Object [object Object] has no method 'keyPress' When I used keyDown browser.actions().keyDown(protractor.Key.ESCAPE).perform(); then it gives me another error. Error: Not a modifier key
Please Help.
Have you tried with this: ptor.actions().sendKeys(protractor.Key.ESCAPE).perform();
Thanks for the quick reply
I have tried below
browser.actions().sendKeys(protractor.Key.ESCAPE).perform();
The test passed but it does not actually hit the escape key meaning the video still remain in full screen
Expected is It should go to normal view.
Please suggest further action.
The function is called sendKeys. Documentation here: https://github.com/SeleniumHQ/selenium/blob/master/javascript/webdriver/actionsequence.js
Hi, I am facing the same issue. Has someone solved this.? I am preparing a generic keyword for my test cases to press escape key whenever require. The test case pases but the action is never completed.