appium 工具工具方法

//判斷文本是不是在其中
    public static boolean contentTexts(List<WebElement> list, String name) {
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).getText().contains(name)){
                return  true;
            }
        }
        return  false;
    }
//點擊空白處好收起鍵盤
    public static void tapWhitePlace(IOSDriver driver)  throws Exception{
        TouchAction action = new TouchAction(driver);
        PointOption whiteplace = PointOption.point(10,130);
        action.tap(whiteplace).perform().release();
    }

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章