{"action":"created","issue":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2338","repository_url":"https://api.github.com/repos/webdriverio/webdriverio","labels_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2338/labels{/name}","comments_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2338/comments","events_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2338/events","html_url":"https://github.com/webdriverio/webdriverio/issues/2338","id":263124801,"number":2338,"title":"browser.timeouts does not work on IE11","user":{"login":"germanz","id":2526045,"avatar_url":"https://avatars1.githubusercontent.com/u/2526045?v=4","gravatar_id":"","url":"https://api.github.com/users/germanz","html_url":"https://github.com/germanz","followers_url":"https://api.github.com/users/germanz/followers","following_url":"https://api.github.com/users/germanz/following{/other_user}","gists_url":"https://api.github.com/users/germanz/gists{/gist_id}","starred_url":"https://api.github.com/users/germanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/germanz/subscriptions","organizations_url":"https://api.github.com/users/germanz/orgs","repos_url":"https://api.github.com/users/germanz/repos","events_url":"https://api.github.com/users/germanz/events{/privacy}","received_events_url":"https://api.github.com/users/germanz/received_events","type":"User","site_admin":false},"labels":[{"id":32695218,"url":"https://api.github.com/repos/webdriverio/webdriverio/labels/Bug","name":"Bug","color":"e10c02","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/webdriverio/webdriverio/milestones/2","html_url":"https://github.com/webdriverio/webdriverio/milestone/2","labels_url":"https://api.github.com/repos/webdriverio/webdriverio/milestones/2/labels","id":1138980,"number":2,"title":"Upcoming","description":"Features or issues that are not blocked and reasonable to work on.","creator":{"login":"christian-bromann","id":731337,"avatar_url":"https://avatars2.githubusercontent.com/u/731337?v=4","gravatar_id":"","url":"https://api.github.com/users/christian-bromann","html_url":"https://github.com/christian-bromann","followers_url":"https://api.github.com/users/christian-bromann/followers","following_url":"https://api.github.com/users/christian-bromann/following{/other_user}","gists_url":"https://api.github.com/users/christian-bromann/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-bromann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-bromann/subscriptions","organizations_url":"https://api.github.com/users/christian-bromann/orgs","repos_url":"https://api.github.com/users/christian-bromann/repos","events_url":"https://api.github.com/users/christian-bromann/events{/privacy}","received_events_url":"https://api.github.com/users/christian-bromann/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":193,"state":"open","created_at":"2015-05-29T00:45:55Z","updated_at":"2018-02-27T17:28:44Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2017-10-05T13:27:02Z","updated_at":"2018-03-27T11:49:52Z","closed_at":"2017-11-06T00:05:11Z","author_association":"NONE","body":"## The problem\r\n\r\nError is thrown when attempting to set timeout in IE11.\r\n\r\n## Environment\r\n\r\n* WebdriverIO version: 4.8.0\r\n\r\n## Details\r\n\r\nIn [lib/protocol/timeouts.js](https://github.com/webdriverio/webdriverio/blob/9e0fa7e5be58afae7a60d7466b2b56a9ebf1d239/lib/protocol/timeouts.js#L16-L28) request data is not formatted according to https://www.w3.org/TR/webdriver/#set-timeouts spec. It works though in chrome, ff, edge. On IE11 however it fails, as it should be formatted for example like this:\r\n```\r\n{\r\n  \"script\": 3000\r\n}\r\n```\r\n\r\ninstead of \r\n```\r\n{\r\n  \"type\": \"script\",\r\n  \"ms\": 3000\r\n}\r\n```\r\n\r\nhence the error below is fired.\r\n\r\n## WebdriverIO logs\r\n\r\n```\r\n...\r\nInvalid timeout type specified: ms\r\nBuild info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'\r\nSystem info: host: 'IE11WIN8_1', ip: '10.0.2.15', os.name: 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_144'\r\nDriver info: driver.version: unknown\r\nTimeout expired waiting for async script\r\n...\r\n```\r\n\r\n## Selenium logs\r\n```\r\nHTTP Status: '500' -> incorrect JSON status mapping for 'script timeout' (408 expected)\r\n```\r\n\r\n## Code To Reproduce Issue\r\n\r\n```\r\ndescribe('test timeout', () => {\r\n  beforeEach(() => {\r\n    browser.timeouts('script', 3000);\r\n  });\r\n});\r\n```\r\n\r\n## Proposed change\r\n\r\n```\r\nexport default function timeouts (type, ms) {\r\n    ...\r\n\r\n    let reqData = this.desiredCapabilities.browserName === 'internet explorer' ? {\r\n     [type]: ms\r\n    } : {\r\n        type: type,\r\n        ms: ms\r\n    };\r\n    return this.requestHandler.create('/session/:sessionId/timeouts', reqData);\r\n});\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/webdriverio/webdriverio/issues/comments/376496267","html_url":"https://github.com/webdriverio/webdriverio/issues/2338#issuecomment-376496267","issue_url":"https://api.github.com/repos/webdriverio/webdriverio/issues/2338","id":376496267,"user":{"login":"christian-bromann","id":731337,"avatar_url":"https://avatars2.githubusercontent.com/u/731337?v=4","gravatar_id":"","url":"https://api.github.com/users/christian-bromann","html_url":"https://github.com/christian-bromann","followers_url":"https://api.github.com/users/christian-bromann/followers","following_url":"https://api.github.com/users/christian-bromann/following{/other_user}","gists_url":"https://api.github.com/users/christian-bromann/gists{/gist_id}","starred_url":"https://api.github.com/users/christian-bromann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christian-bromann/subscriptions","organizations_url":"https://api.github.com/users/christian-bromann/orgs","repos_url":"https://api.github.com/users/christian-bromann/repos","events_url":"https://api.github.com/users/christian-bromann/events{/privacy}","received_events_url":"https://api.github.com/users/christian-bromann/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T11:49:52Z","updated_at":"2018-03-27T11:49:52Z","author_association":"OWNER","body":"@ggiunta yes"}}
{"actor":{"display_login":"christian-bromann"}}