protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Error: Unsupported locator strategy: findOverride

Open Douwe92 opened this issue 13 years ago • 8 comments

Took one of your examples:

expect(ptor.isElementPresent(protractor.By.binding('greet'))).toBe(true);

and turned it into this:

var pincode = ptor.isElementPresent(protractor.By.input('pincode')); expect(pincode).toBe(true);

And I have seriously no clue why this is happening?

Douwe92 avatar Sep 09 '13 07:09 Douwe92

Is there a reason you're saving isElementPresent to a variable? If not, you could try:

expect(ptor.isElementPresent(protractor.By.input('pincode'))).toBe(true);

Another thing to check is if the input has ng-model="pincode".

stickel avatar Sep 09 '13 19:09 stickel

Yeah the NG-Model is pincode, and I saved it for a variable because I use it later on but I changed it to your code but still not working?

Douwe92 avatar Sep 09 '13 19:09 Douwe92

You have the latest version of Protractor installed?

stickel avatar Sep 09 '13 19:09 stickel

yes

Douwe92 avatar Sep 09 '13 20:09 Douwe92

My bad.

isElementPresent is not supported for the 'input' locator yet. It's a bug, should be fixed soon.

juliemr avatar Sep 09 '13 20:09 juliemr

Ahh, Explains so much! Thanks. Loving Protractor keep up the good work!

Douwe92 avatar Sep 09 '13 20:09 Douwe92

So now I want to assertPresence of a binding expect(ptor.isElementPresent(protractor.By.binding('"Pincode" | _'))).toBe(true);

"

{{"Pincode" | _}}

"

It's not working. Am I doing something wrong or

Still giving the same error

Douwe92 avatar Sep 10 '13 14:09 Douwe92

I wonder if the quotes are messing it up? You can do a partial match, so you should be able to do:

expect(ptor.isElementPresent(protractor.By.binding('Pincode'))).toBe(true);

juliemr avatar Sep 10 '13 17:09 juliemr