First off, sorry if this isn't the right place - I couldn't find a Protractor group and didn't want to log an issue in Github if this isn't actually a bug :)
Here's my SO question: https://stackoverflow.com/questions/22753496/how-do-i-assert-an-element-is-focused My test is as follows: var LoginPage = function () { this.basePath = browser.params.baseUrl; this.loginPart = "/#/login"; this.usernameInput = element(by.model('username')); this.get = function () { ... }} it('should focus on the username field on load', function () { loginPage.get(); expect(loginPage.usernameInput).toBe(browser.driver.switchTo().activeElement());}); This assertion throws a gigantic stacktrace that doesn't appear to be of any help. Is there a way of directly comparing elements like this, or do I (as the current lone SO answer says) have to rely on comparing on an attribute or HTML of both elements? -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
