karma-runner / karma-ie-launcher

A Karma plugin. Launcher for Internet Explorer.
MIT License
59 stars 23 forks source link

Support 64-bit IE and isolate environment. #9

Closed christophercurrie closed 10 years ago

christophercurrie commented 10 years ago

This patch tries to auto-detect 64-bit IE by checking for the appropriate environment variables. It also improves reliability of the tests by disabling extensions and using "InPrivate" mode to ignore existing user data.

Addresses #1, #3, #4, and possibly #8.

madhurednext commented 10 years ago

Awesome. This fixed all the IE issues. Thanks.

phadej commented 10 years ago

:+1: This solved our problems as well. However InPrivate disables eg. IndexedDB and probably LocalStorage so tests relying on them are broken.

christophercurrie commented 10 years ago

Perhaps the InPrivate part should be an optional flag, then; I found it necessary to get tests to work for me because some local state was causing them to fail, but clearing my local data should make it work as well.

When I'm next at a Windows machine, I'll see about amending the patch.

vojtajina commented 10 years ago

@christophercurrie thank you so much! I corrected the commit msg and removed the -private flag (people can set it by creating a custom launcher with flags: ['--private'].

Merged as c75ed348d9e48d4ff6d286a99bd72b8f438a3fe9

ruslanss commented 8 years ago

Doesn't seem to work for me on Windows 10 64x Internet Explorer 11. This is what i did:

  1. replaced node_modules\karma-ie-launcher\index.js with https://raw.githubusercontent.com/christophercurrie/karma-ie-launcher/4c6d784af1902c49718d073b47c58bb3f44b69d5/index.js
  2. created User Environment Variable as name: IE_BIN, value: C:\Program Files (x86)\Internet Explorer\iexplore.exe
  3. karma start

it then launched 3 IE11 64-bit browser windows and spit out errors:

31 03 2016 02:09:26.383:WARN [karma]: No captured browser, open http://localhost:9876/
31 03 2016 02:09:26.408:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
31 03 2016 02:09:26.417:INFO [launcher]: Starting browser IE
31 03 2016 02:09:26.524:ERROR [launcher]: Cannot start IE

31 03 2016 02:09:26.638:INFO [launcher]: Trying to start IE again (1/2).
31 03 2016 02:09:27.112:ERROR [launcher]: Cannot start IE

31 03 2016 02:09:27.231:INFO [launcher]: Trying to start IE again (2/2).
31 03 2016 02:09:27.595:ERROR [launcher]: Cannot start IE

31 03 2016 02:09:27.624:ERROR [launcher]: IE failed 2 times (cannot start). Giving up.
31 03 2016 02:09:28.029:INFO [IE 11.0.0 (Windows 10 0.0.0)]: Connected on socket /#C8uU5tfQHe8bIQtFAAAB with id 47914803

31 03 2016 02:09:38.041:WARN [IE 11.0.0 (Windows 10 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
31 03 2016 02:09:38.057:ERROR [karma]: [TypeError: Cannot read property 'map' of undefined]
TypeError: Cannot read property 'map' of undefined
    at _render (C:\git\RankModeller\src\RankModeller.Web\node_modules\karma\lib\reporters\progress.js:51:26)
    at _refresh (C:\git\RankModeller\src\RankModeller.Web\node_modules\karma\lib\reporters\progress.js:55:34)
    at onBrowserComplete (C:\git\RankModeller\src\RankModeller.Web\node_modules\karma\lib\reporters\progress.js:15:21)
    at null.<anonymous> (C:\git\RankModeller\src\RankModeller.Web\node_modules\karma\lib\events.js:13:22)
    at emitOne (events.js:95:20)
    at emit (events.js:182:7)
    at Timeout._onTimeout (C:\git\RankModeller\src\RankModeller.Web\node_modules\karma\lib\browser.js:50:15)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)

what did i do wrong?