javascript - Column method in protractor -


i can't find column method doing in docs. know it's doing?

here code:

var phonenamecolumn = element.all(by.repeater('phone in phones').column('phone.name'));   var query = element(by.model('query'));    function getnames() {     return phonenamecolumn.map(function(elm) {       return elm.gettext();     });   }    query.sendkeys('tablet'); //let's narrow dataset make test assertions shorter    expect(getnames()).toequal([     "motorola xoom\u2122 wi-fi",     "motorola xoom\u2122"   ]); 

column() convenience method columns repeater binding. if imagine table formed repeater, columns correspond model fields, rows - model instances.

for example, if want book name elements repeater:

element.all(by.repeater('book in library').column('book.name')); 

you can single book name element in specific row:

element(by.repeater('book in library').row(0).column('book.name')); 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -