grivescorbett
grivescorbett

Reputation: 1635

Protractor: Invalid locator error with isElementPresent

I have the following simple line of code in my e2e test...

var promise = ptor.isElementPresent(element(by.binding('firstName')));

I get an error that says TypeError: Invalid locator. I don't see many other people getting this error after googling it. Where did I make an error?

Upvotes: 2

Views: 4790

Answers (1)

Nix
Nix

Reputation: 58632

I believe the syntax is(remove element(...)...

var promise = ptor.isElementPresent(by.binding('firstName'));

Upvotes: 5

Related Questions