Reputation: 43491
it('should show archived row profiles', function() {
$$('.custom-control-input').get(0).click()
$$('tr.archived')
.then(function(elements) {
console.log(elements);
})
})
But now how can I check to see if the elements are displayed?
Upvotes: 2
Views: 82
Reputation: 4832
You can also use below piece of code,
var isElementsDisplayed = $$('tr.archived').isDisplayed();
expect(isElementsDisplayed).not.toContain(false);
isDisplayed()
method will return array of boolean values(true/false) based on element display status. you can make a expect statement to check if the result array should not contain value false which means that particular element is not displayed.
Upvotes: 3
Reputation: 91
You can use isDisplayed.
$$('tr.archived').each(function(element, index) {
console.log(element);
expect(element.isDisplayed()).toBe(true);
});
Upvotes: 1