Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

protractor element.all for each

let sportCar;

await element.all(by.css('div[class="cars"]')).each(element => {
        element.getText().then(function (text) {
            if (text === 'Ferrari') {
                sportCar = element;
            }
        });
});
 
PREVIOUS NEXT
Tagged: #protractor
ADD COMMENT
Topic
Name
8+8 =