Appium Automation manipulates fields through indexing
/ * added group users did not get it (there is a problem getting list values) * @ throws Exception * / public static void Group_Add_Team_members () throws Exception {/ * * plus * / AndroidElement plusElement; / * * minus * / AndroidElement immElement; Thread.sleep (3000) / * * get set all list user * / List Group_list = driver.findElements (GetByLocator.getLocator ("Group_user_list")); System.out.println ("get the number of people in the group set list before it is added:" + Group_list.size ()); plusElement = Group_list.get (Group_list.size () + 1) / / get the second immElement = Group_list.get (Group_list.size ()-1); / / get the first System.out.println ("verify whether it is a plus sign:" + plusElement); Thread.sleep (5000); plusElement.click (); driver.findElement (GetByLocator.getLocator ("BusinessCardCearch")). Click () Driver.findElement (GetByLocator.getLocator ("SearchBoxTextInput"). SendKeys ("Beautiful start"); driver.findElement (GetByLocator.getLocator ("SelectTheSearchResults")). Click (); driver.findElement (GetByLocator.getLocator ("Click_ok")). Click (); / * get the full list of settings user * / List Group_list_new = driver.findElements (GetByLocator.getLocator ("Group_user_list")) System.out.println ("get the number of people in the group setting list before the increase:" + Group_list_new.size ()); Assert.assertEquals (Group_list.size (), Group_list_new.size (), 1); driver.pressKeyCode (AndroidKeyCode.BACK);}
Property needs to be obtained successfully in order to operate like this