This currently doesn't work in webdriver with js selectors, but it's a huge pain when there are two elements with the same binding (e.g. item.name).
Looking for an example/syntax to do find Elements from a parent fineElement. something like below.
Can you please give me an example how to do this?
ptor.findElements(protractor.By.tagName('tbody').protractor.By.tagName('tr'))
Check out the examples in findelements_spec here:
https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js#L245
Awesome !!, following works.
ptor.findElement(protractor.By.tagName('tbody')).findElements(protractor.By.tagName('tr')).then(function(rows){
expect(rows.length).toBe(10);
});
Thanks
can the '$' short-hand notation be used to find child elements of an element reference?
for example:
elt = $('.my-parent-class')
children = elt.$$('.my-child-class')
@tony-kerz $ works, but $$ cannot be chained. This inconsistency should probably be fixed.
I needed this but the url is 404 https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js
how to locate both in protractor using java script?
@juliemr
Most helpful comment
I needed this but the url is 404
https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js