测试案例每次运行都来这么一段:

capabilities.setCapability("appium-version", "1.0");         
capabilities.setCapability("platformName", "iOS");       
capabilities.setCapability("platformVersion", "8.3");     
capabilities.setCapability("deviceName", "iPhone 5s");

每次启动模板器,再关闭时间太长了.(即使是写到 SuiteSetup)
现有 40 个案例,当单独调试某个案例时时间太长.

然后我在想如何重用一个 session:
这是 appium 的日志:

info: <-- POST /wd/hub/session/b41a677d-a673-428c-aa74-04a4fb1373f8/element 200 255.321 ms - 87 
{"status":0,"value":{"ELEMENT":"3"},"sessionId":"b41a677d-a673-428c-aa74-04a4fb1373f8"}
{"status":0,"value":{"build":{"version":"1.4.8","revision":"c8179bd8352d3c62d98fa58b324491230df9342a"}}}

只要有这个 sessionid 就可以重用嘛
可是现在的示例 千篇一律全是这样的代码:

SetUp:
self.driver = webdriver.Remote(
            command_executor='http://127.0.0.1:4723/wd/hub',
            desired_capabilities={
                'app': app,
                'platformName': 'iOS',
                'platformVersion': '8.4',
                'deviceName': 'iPhone 6'
            })
tearDown
       driver.close()

问下有没有这样的 Api

SetUp:
     getDriver("原来的连接")
tearDown:
     driver.not_close()


↙↙↙阅读原文可查看相关链接,并与作者交流