gpt4 book ai didi

java - 在Windows中运行脚本后,模拟器需要自动关闭

转载 作者:行者123 更新时间:2023-11-30 01:53:46 25 4
gpt4 key购买 nike

<分区>

在windows上使用Appium执行自动化测试脚本后,模拟器应该会自动关闭。请帮助我。

 public void setUp (String p) throws MalformedURLException,InterruptedException
{

DesiredCapabilities capabilities= new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME,Browser);
capabilities.setCapability(CapabilityType.VERSION,version);
capabilities.setCapability(CapabilityType.PLATFORM,Platform);
capabilities.setCapability("platformName","Android");
capabilities.setCapability("udid","emulator-"+p);
capabilities.setCapability("avd",""+p);

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

capabilities.setCapability("deviceName","");
Thread.sleep(60000);
capabilities.setCapability("appPackage", "com.android.browser");
capabilities.setCapability("appActivity", "com.android.browser.BrowserActivity");

driver=new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com