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

ng-repeat-start support for repeater locator strategy #182

Closed
MandarinConLaBarba opened this issue Oct 23, 2013 · 7 comments
Closed

ng-repeat-start support for repeater locator strategy #182

MandarinConLaBarba opened this issue Oct 23, 2013 · 7 comments

Comments

@MandarinConLaBarba
Copy link

It appears that the repeater locator strategy does not support repeaters declared with ng-repeat-start/end. Looking at the code and through testing I don't see any support for this. Am I correct that this is not supported? And is support for this on the roadmap?

@juliemr
Copy link
Member

juliemr commented Oct 31, 2013

Correct, not currently supported - you'll have to use CSS for now. It should be though.

@MandarinConLaBarba
Copy link
Author

I don't see any branch targeting 1.2. Tests point at 1.0.* - should we start a branch targeting 1.2, or too early?

@juliemr
Copy link
Member

juliemr commented Oct 31, 2013

Yeah, it's probably about time to start testing against 1.2.

@MandarinConLaBarba
Copy link
Author

I see tests now target 1.2. Thanks! I'm trying to add support for ng-repeat-start/end. In the current clientSideScripts helper a row is considered any element w/ the ng-repeat (or similar) attribute, but in the case of ng-repeat-start/end, a row would have to be everything in between, and always at least two elements. So we'd need to modify the signature of methods like clientSideScripts.findRepeaterRows to actually return an array of multiple elements. Do you agree?

@MandarinConLaBarba
Copy link
Author

Well, it looks like webdriverjs executeScript cannot handle this..https://code.google.com/p/selenium/source/browse/javascript/webdriver/webdriver.js#403. I confirmed that nested arrays of DOM elements returned are not parsed into a nested array of WebElements..instead an empty array is returned.

So perhaps need to return a flat structure of elements found (siblings of ng-repeat-start) and then comb through them in the Protractor by.repeater strategy afterward..

@juliemr
Copy link
Member

juliemr commented Nov 22, 2013

Hey, sorry this got dropped for a week. Would like to address for 0.14.0, definitely - adding to that milestone.

@MandarinConLaBarba
Copy link
Author

Thanks and no rush! I was going to try and help but it looks like it will require extensive refactoring..and not sure I'm familiar enough w/ the codebase to make a change that touches that many things at this point..

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

2 participants