Protractor.Key.Enter is not working in ChromeDriver v75.0.3770.8
See original GitHub issueHi,
Hope someone can help me looking into this issue. I updated my chromedriver to the latest version i.e. v75.0.3770.8, my regression tests started failing since then.
See the error message below
Failed: sendKeysToActiveElement
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '***', ip: '172.*.*.*', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
I usually use the command below to to perform RETURN(ENTER) on keyboard. browser.actions().sendKeys(protractor.Key.ENTER).perform();
I reverted back to chrome v74.0.3729.6 and it’s all working fine
Thanks
Bug report
- Node Version: ``10.15.2
- Protractor Version: ``5.4.2
- Angular Version: ``
- Browser(s): ``Chrome
- Operating System and Version `` Windows10
- Your protractor configuration file
var PrettyReporter = require('../Dependencies/protractor-plugins/protractor-reporter-2').Reporter;
var env = require('../Scripts/Common/rigSelection.json');
var log4js = require('log4js');
var date = require('../Scripts/Common/UTC_DateFunctions.js')
var JasmineReporters = require('jasmine-reporters');
var UTC_DateFunctions_currentDate = date.get_Current_Date();
var UTC_DateFunctions_currentTime = date.currentTimeIncludingSeconds();
var currentTime_And_Date = UTC_DateFunctions_currentDate + '_' + UTC_DateFunctions_currentTime;
exports.config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
rootElement: '.ng-app',
suites: {
Commands: './UTC/Verify_Command.js',
},
jasmineNodeOpts: {
showColours: true,
includeStackTrace: true,
defaultTimeoutInterval: 240000
},
beforeLaunch: function () {
var currentTime_And_Date_log = UTC_DateFunctions_currentDate + '_' + UTC_DateFunctions_currentTime + '.log';
var fileLocation = '../logs/';
log4js.configure({
appenders: {
fileLog: { type: 'file', filename: fileLocation + currentTime_And_Date_log },
console: { type: 'log4js-protractor-appender' },
},
categories: {
file: { appenders: ['fileLog'], level: 'debug' },
another: { appenders: ['console'], level: 'debug' },
default: { appenders: ['console', 'fileLog'], level: 'trace' }
}
});
},
onPrepare: function () {
browser.manage().timeouts().implicitlyWait(20000);
browser.manage().window().maximize();
console.log('************Setting all the infrastructure to run the tests****************');
browser.ignoreSynchronization = false;
browser.get(env.rig.UTC);
browser.logger = log4js.getLogger('protractorLog4js');
var ReportFileLocation = '../Reports/TestID_' + browser.params.env.testactivityId;
var prettyReporter = new PrettyReporter({
path: ReportFileLocation,
screenshotOnPassed: false,
project: browser.params.env.project,
rigURL: browser.params.env.rigURL
});
browser.params.prettyReporter = prettyReporter;
jasmine.getEnv().addReporter(prettyReporter);
},
capabilities: {
browserName: 'chrome',
},
baseUrl: '',
params: {
env: {
rig: 'default',
tenant: 'default',
filter: 'NO',
testactivityId: currentTime_And_Date,
rigUser: '',
rigPass: '',
project: 'UTC',
module: '',
moduleVersion: '',
rwwDataFile: '',
alertpath: '',
rigURL: 'https://localhost/utc'
}
}
};
- Output from running the test
Verify test commands - Verify a test command
Message:
Failed: sendKeysToActiveElement
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '***', ip: '172.*.*.*', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
Stack:
UnsupportedOperationError: sendKeysToActiveElement
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '***', ip: '172.*.*.*', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: sendKeys
at thenableWebDriverProxy.schedule (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at actions.map.action (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (<anonymous>)
at C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute_ (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:122:33)
at UserContext.<anonymous> (C:\workspace\Selenium Scripts\Scripts\UTC\Verify_LSTS_Command.js:36:58)
at C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2974:25)
at C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
From: Task: Run it("Verify LSTS command on a junction") in control flow
at UserContext.<anonymous> (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
at C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:64:48
at ControlFlow.emit (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\events.js:62:21)
at ControlFlow.shutdown_ (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2674:10)
at shutdownTask_.MicroTask (C:\Users\user***\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2599:53)
From asynchronous test:
Error
at Suite.<anonymous> (C:\workspace\Selenium Scripts\Scripts\UTC\Verify_LSTS_Command.js:30:5)
at Object.<anonymous> (C:\workspace\Selenium Scripts\Scripts\UTC\Verify_LSTS_Command.js:6:1)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
1 spec, 1 failure
Finished in 71.593 seconds
Issue Analytics
- State:
- Created 4 years ago
- Comments:18
Top Results From Across the Web
Failed: sendKeysToActiveElement error while invoking ...
So I'm not sending the key stroke to an input element. I've tried $('body').sendKeys(protractor.Key.TAB); but that doesn't seem to work.
Read more >失败:sendKeysToActiveElement 铬, Protractor.key.enter 不工作 ...
Protractor.Key.Enter 在ChromeDriver v75.0.3770.8 中不起作用. org.openqa.selenium.UnsupportedCommandException: sendKeysToActiveElement 被抛出并且测试失败。
Read more >sendKeysToActiveElement при вызове sendKeys в ENTER и ...
Solution · Решен issue 2975: Webdriver Actions for keys (CONTROL, SHIFT etc.. ) not working in Chrome 75Driver.0.3770.8 [Pri-2] · Решен issue 2981:...
Read more >Failed: sendKeysToActiveElement error while invoki - 码农岛
My Protractor tests that use sendKeys to press Enter or Tab failed today after I was auto-updated to Chrome 76. This worked find...
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 FreeTop 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
Top GitHub Comments
It seems bug fixed in chromedriver 77.0.3865.10:
Hi @kiran333 , @jmutidjo
enabling the below capability enables chrome 74+ to use legacy API. Please try it works.
‘goog:chromeOptions’: { w3c: false }
Thanks !