webdriverio: setValue() command does not work and throws error in Edge
Edge WebdriverIO Issue
Environment (please complete the following information):
- WebdriverIO version: 5.2.7
- Mode: WDIO Testrunner
- If WDIO Testrunner, running sync/async: sync
- Node.js version: 10 LTS
- NPM version: 6.4.1
- Browser name and version: Edge 16
- Platform name and version: Windows 10
- Additional wdio packages used (if applicable): [ @wdio/browserstack-service , @wdio/cli, @wdio/junit-reporter, @wdio/local-runner, @wdio/mocha-framework,@wdio/spec-reporter, @wdio/sync]
Config of WebdriverIO Base Config
exports.config = {
waitforTimeout: 10000,
user: process.env.BROWSERSTACK_USERNAME,
key: process.env.BROWSERSTACK_ACCESS_KEY,
host: 'hub.browserstack.com',
exclude: [],
execArgv: [],
maxInstances: 6,
capabilities: [],
'browserstack.video': true,
'browserstack.debug': true,
'browserstack.networkLogs': true,
debug: false,
sync: true,
logLevel: 'error',
coloredLogs: true,
deprecationWarnings: true,
bail: 0,
screenshotPath: 'test/e2e/errorShots/',
reporters: [
'spec',
[
'junit',
{
outputDir: './test/e2e/test-reports/',
outputFileFormat: function(opts) {
return `test-results-${opts.cid}.xml`
}
}
]
],
framework: 'mocha',
mochaOpts: {
ui: 'bdd',
timeout: 150000
}
Edge Specific inherited config
const merge = require('deepmerge')
const wdioConf = require('./wdio.conf.js')
exports.config = merge(wdioConf.config, {
host: 'hub.browserstack.com',
services: ['browserstack'],
exclude: ['test/e2e/specs/sanity-check/**/*.js'],
specs: ['test/e2e/specs/**/*.js'],
capabilities: [
{
browserName: 'edge',
os: 'Windows',
os_version: '10',
name: 'Edge Single Test',
build: 'Example Build',
project: 'Example Project'
}
],
browserstackLocal: false
})
Describe the bug
In Edge 16 on Browserstack, WebdriverIO throws errors and is unable to send keys with the .setValue() command. The value never gets set and the only stack trace shown in the console is JSON format error: parameters object must contain pair with name "keysToSend" this same exact code executes in the latest chrome no problem.
To Reproduce Steps to reproduce the behavior: Make a barebones WDIO Test Runner app with BrowserStack services and specify edge and call the setValue() command on any field on any site to see this issue.
Expected behavior setValue() command should clear input field and send keys like it does on Chrome and Firefox but for Edge.
Log If applicable, add logs to help explain your problem. https://gist.github.com/DanLambe/3e8857fd6b9aec5496eeff7fab098b6b
Additional context This only started happening when I updated to the latest WDIO v5 project, not sure it this is a BrowserStack related issue or just implementation change that broke.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 33 (5 by maintainers)
Yep, you’re absolutely right. I’ll submit an issue to those folks tomorrow and report back in this thread once I’ve got news. Thanks for taking a look!
I’ve just opened an issue ad developer.microsoft.com: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/22429136/
Yes, I’m getting error with setValue() function in Edge browser after wdio version 5 upgrade . The same syntax works in Chrome and IE perfectly.
so why not adding the distinction here https://github.com/webdriverio/webdriverio/blob/master/packages/webdriverio/src/commands/element/addValue.js ?