hindsightsoftware / karma-webdriver-launcher

A plugin for Karma 0.9.2 to launch WebDriver instances
6 stars 0 forks source link

Karma 0.9.3 #1

Open hppycoder opened 11 years ago

hppycoder commented 11 years ago

Have you guys worked with the 0.9.3 build of Karma? It includes the code to define the launchers, I just can't get your launcher to work inline with 0.9.3.

Any help?

var webdriverConfig = {
    url: 'selenium.dev.com',
    port: 9999
  };

  karma.defineLauncher('SahiChrome', 'WebDriver', {
    config: webdriverConfig,
    spec: {
      browserName: 'Chrome',
      version: '7',
      platform: 'Windows XP',
      tags: ['IE7', 'Windows XP'],
      name: 'IE7:Windows XP'
    }
  });

  karma.defineLauncher('my_chrome','Chrome', {
      flags: ['--args –-disable-web-security']
  });

Output:

EBUG [plugin]: Loading inlined plugin (defining launcher:SahiChrome).
DEBUG [plugin]: Loading inlined plugin (defining launcher:my_chrome).
WARN [proxy]: proxy "http://domain.com" normalized to "http://domain.com/"
INFO [karma]: Karma v0.9.3 server started at http://localhost:9876/__karmaRunner/
WARN [launcher]: Launcher "SahiChrome" is not registered!
hppycoder commented 11 years ago

If you are like me and forgot that with 0.9.3 the configuration file changed significantly you will need to put this (or something similar into your plugins):

plugins: [
      'karma-chrome-launcher',
      'karma-firefox-launcher',
      'karma-junit-reporter',
      'karma-ng-scenario',
      'karma-webdriver-launcher'
    ]

Note the karma-webdriver-launcher, still having problems getting it connected to Sahi so any help there would be much appreciated (if anyone knows).