I want to check if any text exists in a string or not (using a protractor).
In my case, the following code:
element(by.css('h1.text-center')).getText();
will result in:
ArrowGrey Slim Fit Formal Trouser -1 (Size - X)
Now I want to check if the string is ArrowGrey Slim Fit Formal Trouserin the above text or not.
Please suggest!
source
share