SnackBar on Web testing

Please Help me handling snack bar on my web testing using katalon studio.
I was using waitForElementVisible and VerifyAlert, but still unsuccessful.

Hi @indraww89

What error are you encountering ? Please provide the full console log.

Yesterday I had trouble determining the right code to capture the text on snackbar.
I try and try again, and find a suitable code >
Global Variable.Verify Check = WebUI.verify TextNotPresent(‘No. Whatsapp / Email telah terdaftar’, false, FailureHandling.CONTINUE_ON_FAILURE)

btw, thx for your response, Sir :grinning:

1 Like

First inspect the snackbar and copy the xpath and keep it aside(//div[contains(text(),‘Successful’)])

In katalon use object spy >
Click on new page element >
add new object element >
selection method as xpath >
Selected locator box > paste the xpath which you created by inspecting the snackbar
Now save

In katalon : Script mode
def Snacktext = WebUI.getText(findTestObject(‘Product creation/Snackbar/Snackbar’))

Mnaual mode:
Item : Gettext
object: object created by using spy object

Note: After clicking on submit button we need to wait at least for 2 seconds and snack bar will be displayed. so using delay item.