appium/appium — pull request #733 by houlianpi (2013-06-08 10:15:26+00:00)
Title: use new Automation file replace the old one

when tap a button which is not visible,new Automation.tracetemplate will auto scroll it to visible. The old one does not.

Sample:
@Test
public void bookdouban() throws InterruptedException {
driver.get("http://book.douban.com/subject/24706032");
ArrayList arr = (ArrayList) driver.findElements(By.xpath("//button[@class=\"ckbase-btn ck-login\"]"));
String value = ((WebElement)arr.get(0)).getText();
Assert.assertEquals(value,"想读");
Thread.sleep(10000);
System.out.println(value);
((WebElement)arr.get(0)).click();
Thread.sleep(3000);
String buttonTitle = driver.findElement(By.xpath("//button[@class=\"cancel\"]")).getText();
System.out.println(buttonTitle);
Assert.assertEquals(buttonTitle,"取消");
}

Use the new one test passed, the old one not.