I feel bad for posting things about Protractor here, but I don't know where else to turn since the people that put out that product don't seem to think it needs any means of user support. I'm trying to get Protractor running and thus far it has been anything but easy. My latest snag is that Protractor simply refuses to find Angular. The ng-app attribute is on the HTML tag and Protractor is configured accordingly. When the page loads Angular loads and run and puts my first partial in place, so I know it is present and running.
exports.config = {
// The location of the selenium standalone server .jar file.
seleniumServerJar: 'C:/Dev/PrismWeb/selenium/selenium-server-standalone-2.35.0.jar',
// The port to start the selenium server on, or null if the server should
// find its own unused port.
seleniumPort: null,
// Chromedriver location is used to help the selenium standalone server
// find chromedriver. This will be passed to the selenium jar as
// the system property webdriver.chrome.driver. If null, selenium will
// attempt to find chromedriver using PATH.
chromeDriver: 'C:/Dev/PrismWeb/selenium/chromedriver.exe',
// Additional command line options to pass to selenium. For example,
// if you need to change the browser timeout, use
// seleniumArgs: ['-browserTimeout=60'],
seleniumArgs: [],
// The address of a running selenium server. If specified, Protractor will
// connect to an already running instance of selenium. This usually looks like
seleniumAddress: null,
// The timeout for each script run on the browser. This should be longer
// than the maximum time your application needs to stabilize between tasks.
allScriptsTimeout: 110000,
// ----- What tests to run -----
// Spec patterns are relative to the location of this config.
specs: [
'c:/dev/prismweb/test/e2e/*.js'
],
// ----- Capabilities to be passed to the webdriver instance ----
// For a full list of available capabilities, see
// and
capabilities: {
'browserName': 'chrome'
},
// A base URL for your application under test. Calls to protractor.get()
// with relative paths will be prepended with this.
// Selector for the element housing the angular app - this defaults to
// body, but is necessary if ng-app is on a descendant of <body>
rootElement: 'html',
// ----- Options to be passed to minijasminenode -----
jasmineNodeOpts: {
// onComplete will be called just before the driver quits.
onComplete: null,
// If true, display spec names.
isVerbose: true,
// If true, print colors to the terminal.
showColors: true,
// If true, include stack traces in failures.
includeStackTrace: true,
// Default time to wait in ms before a test fails.
defaultTimeoutInterval: 30000
}
};
UnknownError: javascript error: angular is not defined
(Session info: chrome=30.0.1599.69)
(Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 19 milliseconds
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info:
os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_21'
Session ID: c93ded5975147b290017661c82b4eb98
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, browserName=chrome, chrome={chromedriverVersion=2.2}, rotatable=false, locationContextEnabled=true, version=30.0.1599.69, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, browserConnectionEnabled=false, webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, takesScreenshot=true}]
Any guesses? I'm flat out stumped.