【问题标题】:Appium not Working with iOSAppium 不适用于 iOS
【发布时间】:2014-06-25 22:03:25
【问题描述】:

我是使用 Appium 的新手。关注THIS 教程。我实际上有一个问题。当我运行我的 JAVA 代码“Bash 控制台”运行时,没有其他任何事情发生。

这是我的 Java 代码:

public void setUp() throws Exception {

// set up appium

File appDir = new File("/Users/ebryx/Library/Developer/Xcode/DerivedData/AppforTesingAutomation-fwqzlaiulhrxencjlttlxpjdhkwk/Build/Products/Debug-iphonesimulator");
File app = new File(appDir, "AppforTesingAutomation.app");

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");

capabilities.setCapability(CapabilityType.VERSION, "7.0");

capabilities.setCapability(CapabilityType.PLATFORM, "Mac");

capabilities.setCapability("app", app.getAbsolutePath());

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub")

,capabilities);

System.out.println("App launched");

}



//@AfterMethod
public void tearDown() throws Exception {
driver.quit();
}



//@Test
public void testCases() throws InterruptedException {

//String myname = "Smriti";

driver.findElement(By.name("Change Color")).click();
//driver.findElement(By.xpath("//textfield[1]")).sendKeys(myname);
driver.findElement(By.name("Change Color")).click();

Thread.sleep(5000);

// write all your tests here

}

下面是图片。

【问题讨论】:

    标签: ios appium


    【解决方案1】:

    当然什么都不会发生。 我相信你的程序现在不应该做什么。

    您需要测试引擎标记,那些您已注释掉的... 您选择的教程非常好,我也开始使用它。不要忘记安装 TestNG。

    @BeforeMethod
    public void setUp() throws Exception {
      ...
    }
    
    @AfterMethod
    public void tearDown() throws Exception {
      ...
    }
    
    @Test
    public void testCases() throws InterruptedException {
      ...
    }
    

    【讨论】:

      猜你喜欢
      • 2017-08-20
      • 2015-09-23
      • 2016-07-23
      • 1970-01-01
      • 2016-09-08
      • 2015-03-04
      • 1970-01-01
      • 1970-01-01
      • 2014-12-19
      相关资源
      最近更新 更多