Search code examples
javaandroidseleniumautomationselendroid

How to verify a toast message in selendroid


I need to verify a toast message like "created successfully". I tried by using linktext. But its not working.Can anyone help me regarding this?


Solution

  • Please use following code in your selendroid code

    waitForElement(By.partialLinkText("Your Toast message"), 4, driver);

    where first parameter is your toast message. Second parameter is Time duration in Seconds,third is driver.