If the provided text(p2) is empty string the test should return failure, but this function returning success while comparing with empty string. For example, if we compare ‘STANDARD DEFINITION OUTPUT’ with empty string (i.e. “ ”) the test is returning success.
If the provided text(p2) is not complete string then test should return failure. But this function behavior is different, please looks at the below examples.
@Harini13 Looks like you are passing the wrong arguments. Based on the documentation, the second argument is the context or other words the element you wanna check against
@Harini13 based on the documentation, p1 is the text you wanna check. P2 is the context or element. If you don’t provide p2, it means it checks the text against the texts in webpage, if you provide p2 is an element for example h1. It means you wanna see the text equals with the text from h1.