SS01
3 years agoOccasional Contributor
Writing script test to validate text which has some part dynamic but the rest remains the same
I would like to know a way to validate some text on search page using javascript which is returning number of items based upon what has been searched but the remaining text remains the same (e.g. 20 items found or 0 items found where 20 and 0 can change but remaining text remains the same). I would want the test to pass as long as there is a number coming back doesn't matter if it is a zero. A test should fail if nothing is coming back in the number place.