I want to verify that one screen string value with other screen string value. For example, if I try to select one product from the product list screen, the product detail screen is opened which is selected from the list. In this case, I want to verify the product name whether the selected product and opened product is the same or not by using protractor.
This is my Code:
productName = element(by.css('.item_name .ng-binding')).get(value).filter(function(text)
{
if(productName.getText() == element.all(by.css('.LinesEllipsis')).get(1))
{
productName.click();
expect(element.all(by.css('.LinesEllipsis')).get(1).isDisplayed()).toBeTruthy();
}
}
productName = element(by.css('.item_name .ng-binding')).get(value).filter(function(text))
. You are missing a ')' it looks like to me.