java实现获取toast弱提示

        // 获取到toast信息
        // toast只能够根据它的文本值来定位到
        WebElement toastElement = androidDriver.findElementByXPath("//*[contains(@text,'登录成功')]");
        
        //toast元素是不能够点击,提示用户信息
        System.out.println(toastElement.getText());

原文地址:https://www.cnblogs.com/tiansc1/p/15015841.html