It looks like jQuery syntax, but it is not, it is part of Protractor. Therefore, it .childrenthrows an error, because we actually do not use jQuery. $is a shortened version of element(by.css())ie
$('my-css'); is the same as element(by.css('my-css'));
They also have $$that coincides withelement.all(by.css())
Despite the lack of documentation, you must not use bindings to search for children . those. using the “Julie” demo (I changed the example):
describe('Protractor Demo App', function() {
it('read the header', function() {
browser.get('http://juliemr.imtqy.com/protractor-demo/');
$('h3').getText().then(function (val) {
console.log(val);
});
});
});
h3, . $ $$ css.
: $$, $,
, ( $$: http://luxiyalu.com/protractor-locators-selectors/