keyDown() does not work with Internet Explorer Driver
See original GitHub issueI have tried to do it in different ways, but what works on Chrome (version 46.0.2490.86 m) and Firefox (version 42.0) won’t work with IE 9. Neither
browser.actions()
.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '1'))
.perform()
nor
browser.actions()
.keyDown(protractor.Key.CONTROL)
.sendKeys('1')
.keyUp(protractor.Key.CONTROL)
.perform();
work. I use protractor to send my tests to the selenium standalone server (which is on a VM which runs win7). Please tell me in case I overlooked something or if there is a workaround for this issue.
Full test:
describe('keyDown', function () {
browser.ignoreSynchronization = true;
browser.get('http://ci.seleniumhq.org:2310/common/keyboard_shortcut.html');
it('should work with IE9', function () {
browser.actions()
.sendKeys(protractor.Key.chord(protractor.Key.CONTROL, '1'))
.perform()
expect(element(by.tagName('body')).getAttribute('style')).toContain('background: red');
});
});
Thank you in advance, Miro
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
keyDown() does not work with Internet Explorer Driver #1351
I have tried to do it in different ways, but what works on Chrome (version 46.0.2490.86 m) and Firefox (version 42.0) won't work...
Read more >WebDriver - Key commands in Internet Explorer - Stack Overflow
I've had to resort to using a Robot to do it for Internet Explorer: import java.awt.Robot ... Robot robot; try { robot =...
Read more >Keypress event not working in IE - MSDN - Microsoft
Hi kumar402,. Keypress event is not working in IE. in my angular application. The keypress() method and keydown() method should be supported in ......
Read more >Re: keyDown(keys.CONTROL) not working at all
By using the type "WebDriver" in the line I marked in the sample, you declared a local variable named "driver" in your setUp()...
Read more >Tutorial On Handling Keyboard Actions In Selenium ...
Implementing that change would need proper usage of Keyboard Actions in Selenium WebDriver. This will also depend on whether the browser on ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What happens if you start your IE session with setting the
requireWindowFocus
capability totrue
?requireWindowFocus capability to true helped