Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

ElementArrayFinder does not support isPresent() #3812

Closed
keithdtyler opened this issue Dec 9, 2016 · 2 comments
Closed

ElementArrayFinder does not support isPresent() #3812

keithdtyler opened this issue Dec 9, 2016 · 2 comments

Comments

@keithdtyler
Copy link

keithdtyler commented Dec 9, 2016

When refactoring page objects to use $$() instead of element(by()), I found that all my isPresent() calls blew up. It seems that ElementArrayFinder does not have isPresent(). This was hard to comprehend because I thought that EAFs and EFs were functionally interchangeable (and the api docs suggest so). EAFs seem to have all the same functions as EFs... except this one.

Kinda surprised I can't find any other examples of people running into this.

I suggest that EAF.isPresent be implemented, and it could just be something like function(){ return this.count>0; }

  • Node Version: 6.9.1
  • Protractor Version: 4.0.9
  • Angular Version: 1.5.5
  • Browser(s): chrome
  • Operating System and Version OSX 10.11.6
@pittgoose
Copy link
Contributor

I'm sure someone has already thought of this, but element(by()) != $$(). Unless you meant element.all(by()) you're talking about two different types of selectors.

@juliemr juliemr closed this as completed Feb 3, 2017
@keithdtyler
Copy link
Author

@pittgoose Yep, I sure was talking about two different types of selectors, which as I said otherwise largely have the same methods, applied appropriately to the different contexts. The use of the latter over the former wasn't up to me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants