I am a newbie for automation tool, having no coding skills so please guide me as clearly as you can.
I am using Playwright (Typescript) to perform automation testing for a basic website and I have trouble to verify the "toast message".
- I need to know the way to get Xpath of toast message for Playwright Typescript. Currently, the Developer gave me this: //ngb-alert//pre/text()'
But how to make sure that it is correct?
- Was it exact when I used the assertion "toContainText" to check the toast message? If not, which one should be use for this case ?
You are comparing locator with string. You need to use locator.innerText() to get text from the control and then need to verify.