theintern / leadfoot

A JavaScript client library that brings cross-platform consistency to the Selenium WebDriver API.
Other
170 stars 24 forks source link

Selenium 3.4 and IE 9 fail in capabilities check #109

Closed t2t2 closed 7 years ago

t2t2 commented 7 years ago
> intern-runner config=tests/intern

Listening on 0.0.0.0:9000
Tunnel started
Suite internet explorer 9 on ANY FAILED
TypeError: Cannot read property 'slice' of undefined
  at ProxiedSession.get  <node_modules\intern\lib\ProxiedSession.js:77:38>
  at get  <node_modules\leadfoot\Server.js:470:20>
  at testedCapabilities.brokenElementSerialization  <node_modules\leadfoot\Server.js:741:12>
  at next  <node_modules\leadfoot\Server.js:440:7>
  at next  <node_modules\leadfoot\Server.js:447:7>
  at <node_modules\leadfoot\Server.js:449:7>
  at new Promise  <node_modules\dojo\Promise.ts:411:3>
  at addCapabilities  <node_modules\leadfoot\Server.js:425:11>
  at <node_modules\dojo\Promise.ts:393:15>
  at runCallbacks  <node_modules\dojo\Promise.ts:11:11>

TOTAL: tested 0 platforms, 0/0 tests failed; fatal error occurred

Seems to be caused by capabilities.initialBrowserUrl moving to capabilities['se:ieOptions'].initialBrowserUrl:

{ 'webdriver.remote.sessionid': '57ce4d37-1a1d-4b18-8af0-1ddd90fa9a14',
  'se:ieOptions':
   { browserAttachTimeout: 0,
     elementScrollBehavior: 0,
     enableElementCacheCleanup: true,
     enablePersistentHover: true,
     'ie.browserCommandLineSwitches': '',
     'ie.enableFullPageScreenshot': true,
     'ie.ensureCleanSession': false,
     'ie.fileUploadDialogTimeout': 3000,
     'ie.forceCreateProcessApi': false,
     'ie.forceShellWindowsApi': false,
     'ie.useLegacyFileUploadDialogHandling': false,
     ignoreProtectedModeSettings: false,
     ignoreZoomSetting: false,
     initialBrowserUrl: 'http://localhost:13501/',
     nativeEvents: true,
     requireWindowFocus: false },
  browserName: 'internet explorer',
  pageLoadStrategy: 'normal',
  unhandledPromptBehavior: 'dismiss',
  takesScreenshot: true,
  javascriptEnabled: true,
  version: '9',
  platform: 'WINDOWS',
  cssSelectorsEnabled: true,
  unexpectedAlertBehaviour: 'dismiss',
  platformName: 'WINDOWS',
  browserVersion: '9',
  remoteFiles: true,
  returnsFromClickImmediately: true,
  implicitWindowHandles: false,
  supportsKeysCommand: true,
  supportsWindowRectCommand: true,
  mouseEnabled: true,
  touchEnabled: false,
  supportsNavigationDataUris: false,
  supportsCssTransforms: true,
  shortcutKey: '',
  rotatable: false,
  supportsExecuteAsync: false,
  dynamicViewport: true,
  scriptedParentFrameCrashesBrowser: false }

Selenium version: 3.4.0 IEDriver version: 3.4.0

jason0x43 commented 7 years ago

The switch to se:ieOptions was, indeed, the issue. Fixed in https://github.com/theintern/leadfoot/commit/ec21102be3e070e2ed3526941d706b19abe902bd.