webdriver.close 报错问题 解决方案
来源:互联网 发布:怎么开好淘宝店? 编辑:程序博客网 时间:2024/05/23 19:46
解决方案转载自:
http://blog.csdn.net/aerchi/article/details/43985099
使用appium wd.close()时遇见报错:
Method is not implemented ..
在使用webdriver操作时,点击主窗口的链接,会弹出子窗口。此时就会有两个窗口,如主窗口为mainWindow,子窗口为detailWindow。
1、使用detailWindow = mainWindow.switchTo().window(detailWindowHandle); 切换并定位到子窗口中。
2、然后关闭子窗口,调用detailWindow.quit(),
3、mainWindow.switchTo().window(mainWindowHandle); 切换回到父窗口
4、mainWindow.quit();关闭父窗口
程序执行到第四步时,出错了,提示类似“no a session ……”错误信息,
查了一下网上的webdreiver 的 api,才发现,
quit()详细信息: “Quits this driver, closing every associated window”,执行这个方法后,driver会关闭所有关联窗口。
close()详细信息:Close the current window, quitting the browser if it's the last window currently open ,此方法是关闭当前窗口,或最后打开的窗口。
部分代码如下:
1. webDriver.Close() - Close the browser window that the driver has focus of //关闭当前焦点所在的窗口
2. webDriver.Quit() - Calls dispose //调用dispose方法
3. webDriver.Dispose() Closes all browser windows and safely ends the session 关闭所有窗口,并且安全关闭session
大功造成,特此记录一下。
- webdriver.close 报错问题 解决方案
- 后台报错 already close
- Scanner关闭close()报错
- Selenium WebDriver启动FireFox浏览器报错org/w3c/dom/ElementTraversal的解决方案
- webdriver调用phantomJS报错
- Selenium - Differences between WebDriver.close(), WebDriver.dispose() and WebDriver.quit()
- mysql 连接超时问题报错解决方案
- 解决easyui中重复调用$.messager.progress('close')报错问题
- webdriver启动IE浏览器_报错
- NodeJs访问MySQL老是报Pool Close问题。
- as3 报错#2029 ------sound.close方法报错
- WebDriver中close()与quit()的不同
- WebDriver api 中close、quit的区别
- selenium webdriver方法qiut()close()区别
- 关于MySQL的wait_timeout连接超时问题报错解决方案
- 关于MySQL的wait_timeout连接超时问题报错解决方案
- 在jsp引入jquery报错,$找不到问题的解决方案
- 关于MySQL的wait_timeout连接超时问题报错解决方案
- android原生TextView怎么控制是否开始跑走马灯
- 解决h5调用相机时页面dismiss到根控制器的问题
- 【codeforces 760B】Frodo and pillows
- Android 原生控件ViewFlipper实现淘宝头条垂直滚动广告条
- 淘宝解决方案~
- webdriver.close 报错问题 解决方案
- 从欧几里得算法到组合数取模
- android ListView的item含有多个EditText导致错位
- MongoDB数据库介绍以及MongoVUE的简单使用
- Python爬虫,教你三步搞定
- js数字计算 误差 解决方法
- 混淆代码总结
- Hdu5860 Death Sequence
- Spring配置之<context:*>标签的三两事