如何在android studio中创建胖罐

时间:2017-05-31 11:00:25

标签: android android-studio appium

public class WaitTests {

     WebDriver driver;

     @Before
     public void setUp() throws MalformedURLException {

      DesiredCapabilities capabilities = new DesiredCapabilities();

      capabilities.setCapability("deviceName", "XT1562");

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

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

      capabilities.setCapability("platformName", "Android");

      capabilities.setCapability("appPackage", "com.android.calculator2");

      capabilities.setCapability("appActivity", "com.android.calculator2.Calculator");

      driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
      driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);


     }

     @Test
     public void testFirstCalculator() {

      driver.findElements(By.xpath("//android.widget.Button")).get(0).click();

      driver.findElement(By.name("7")).click();

     driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS); 
    }

请任何人告诉我如何在Android工作室创建胖罐(我在谷歌搜索但没有得到任何正确的方法来创建fat.jar)所以。我想创建可执行文件来运行上面的代码。没有任何IDE

0 个答案:

没有答案