I'm currently experimenting with AngularJS tests using Protractor. Here is the stacktrace I have at the moment:
Starting selenium standalone server...
Selenium standalone server started at http://192.168.0.150:51197/wd/hub
F
Failures:
1) E2E: The Dashboard : Main Page should have a working dashboard
Message:
timeout: timed out after 5000 msec waiting for spec to complete
Stacktrace:
undefined
Finished in 5.659 seconds
1 test, 1 assertion, 1 failure
Shutting down selenium standalone server. Here is my spec.js file:
describe('E2E: Open Login Page', function() {
var driver = browser.driver;
driver.get('http://localhost:8080/accounts/login/?next=/dashboard/')
driver.findElement(By.name("username")).sendKeys("user");
driver.findElement(By.name("password")).sendKeys('password');
//driver.findElement(By.xpath("\\button[]")
driver.findElement(By.xpath("//button[contains(text(), 'Login')]")).click();
});
describe('E2E: The Dashboard', function() {
var ptor = protractor.getInstance();
describe(': Main Page', function() {
it('should have a working dashboard', function() {
ptor.get('/dashboard/#/');
expect(ptor.getTitle()).toContain('Dashboard');
})
})
});
Can anyone help me figure out what I'm doing wrong? Any assistance would be greatly appreciated.