I couldn’t really find an answer to what I’m trying to do…
So I have this test case where I integrate with gmai to read an email content… basically validating reset pw email was sent and verifying one line from the email.
I setup gmail integration with katalon and i’m able to parse the contents from the email… i store that in a variable…
but now I need to verify that certain string is present in that email content.
So I have a variable that parsed the entire email content - “parseGmail” and I have another variable that has the partia expected string from that email … i tried severa different ways but test seem to be trying to verify the entire email content.
println parseGmail String expectedEmail = 'Someone has requested to reset the password for your account.' assert WebUI.verifyTextPresent(parseGmail, expectedEmail, false)
i tried this as well.
parseGmail = WebUI.verifyTextPresent(expectedEmail, false)
I got it to work by doing the splice/trim method but i just don’t like that method -
String pwReset = parseGmail.substring(0,72).trim() println pwReset assert (expectedEmail = pwReset)