Hi,
I am using Java with TestNG framework and appium tfor UI automation. I have started with iOS app.
I am able to load app on iPhone Simulator using appium.
First screen is image. Something like splashActivity on Android. Then the home screen is loaded.
I am not sure what to write in my test to load home screen.
package com.PeddleSeller.test;
import java.net.URL;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.CapabilityType;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.ios.*;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.annotations.Test;
public class PeddleSellerTest {
public static IOSDriver driver;
@BeforeMethod
public void setUp() throws Exception {
/*
DesiredCapabilities caps = DesiredCapabilities.iphone();
caps.setCapability(“appiumVersion”, “1.4.0”);
caps.setCapability(“deviceName”,“iPhone Simulator”);
caps.setCapability(“deviceOrientation”, “portrait”);
caps.setCapability(“platformVersion”,“8.1”);
caps.setCapability(“platformName”, “iOS”);
caps.setCapability(“browserName”, “”);
caps.setCapability(“app”,“sauce-storage:PeddleSeller.zip”);
driver = new RemoteWebDriver( new URL(“http://himanshupeddle:[email protected]:80/wd/hub”), caps);
DesiredCapabilities caps = new DesiredCapabilities();
*/
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(“appium-version”, “1.4.1”);
capabilities.setCapability(“platformName”, “iOS”);
capabilities.setCapability(“platformVersion”, “8.1”);
capabilities.setCapability(“deviceName”, “iPhone 4s”);
capabilities.setCapability(“app”, “/Users/ankit/Desktop/Appium/PeddleSeller.app”);
capabilities.setCapability(“bundleId”,“com.Peddle-Seller”);
capabilities.setCapability(“UDID”,“ae26449606d59949b06130c11c7fd0fc7a1a7d59”);
driver = new IOSDriver(new URL(“http://127.0.0.1:4723/wd/hub”), capabilities);
}
@AfterMethod
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void testCases() throws InterruptedException {
}
}
Nilofar Jargela
Now
Gunjan Ranparia
public void tearDown() throws Exception {
driver.quit();
}
@Test
public void testCases() throws InterruptedException {
}
}