There are many element location strategies available in protractor. Click here to know about element locators in protractor.
by.js is one more element locating strategy available in protractor. We need to pass javascript code as a string or as a function to by.js to get single/multiple element(s).
Pass javascript code as a string:- Identify single element var » Continue Reading.