Finding elements by xpath
WebElement digit_9 = driver.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.support.v4.view.viewPager[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[1]/android.widget.Button[3]"));
Finding elements by name
WebElement editBox = driver.findElement(By.name("IntegerB"));
Finding elements by IosUIAutomation
findElements(By.IosUIAutomation(String IosUIAuto));
//这个方法会返回一个元素的数组,我们需要通过索引定位到唯一的元素,例如
WebElement editBox = driver.findElements(By.IosUIAutomation(".elements()[0]"));
WebElement editBox = driver.findElements(By.IosUIAutomation(".textFields()[0]"));