转python+selenium 使用switch_to_alert 出现的怪异常
2014-12-03 08:57
513 查看
如果switch_to_alert不工作,最重要的问题就是,有1个以上的浏览器开启,导致alert抓取不到。并且在使用switch_to_alert的时候时间会比较长一些,需要等待一会儿才能完成accept等的工作。
原因是因为多个浏览器开启导致无法准确定位到哪个浏览器上,例如同时开启了两个firefox的浏览器,webdriver就无法定位到要测试的那个浏览器上,也就无法正常的获取到测试的那台浏览器上的alert窗口。
原因是因为多个浏览器开启导致无法准确定位到哪个浏览器上,例如同时开启了两个firefox的浏览器,webdriver就无法定位到要测试的那个浏览器上,也就无法正常的获取到测试的那台浏览器上的alert窗口。
相关文章推荐
- python+selenium 使用switch_to_alert 出现的怪异常
- python+selenium 使用switch_to_alert 出现的怪异常
- selenium+python 浏览器标签页跳转 switch_to_window
- 解决使用数据库时代理类强转出现异常$Proxy0 cannot be cast to java.sql.Connection
- 使用python3的selenium自动化测试遇到的一些异常提示(一)
- 使用Gevent程序正常运行出现这个异常KeyError(155880780,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored解决办法
- python selenium模块使用出错解决,Message: 'geckodriver' executable needs to be in PATH
- python使用异步任务celery出现异常崩溃时retry重试 推荐
- python selenium模块使用出错解决,Message: 'geckodriver' executable needs to be in PATH
- Openwrt下安装Python3.5运行出现异常:Fatal Python error: Py_Initialize: Unable to get the locale encoding
- 使用ssh框架时出现 failed to lazily initialize 或者 no session 异常
- 使用python通过selenium模拟打开chrome窗口报错 出现 "您使用的是不受支持的命令行标记:--ignore-certificate-errors
- python使用selenium获取元素出现错误:"errorMessage":"Compoud class names not permitted"
- 64位win7中使用vs2013为python3.4安装pycrypto-2.6.1插件报Unable to find vcvarsall.bat异常解决方式
- Windows下使用BeautifulSoup 出现You are trying to run the Python 2 version of Beautiful Soup under Python
- python+selenium在Pycharm中使用alert报错问题解决
- 使用hibernate出现的一个异常org.hibernate.PropertyAccessException: Null value was assigned to a property of pr
- 使用AlertDialog.Builder的时候出现错误:unable to add window --token null is not for an application的解决办法
- pupupwindow中使用spinner出现BadTokenException: Unable to add window 异常问题
- Spring中使用proxool连接池的配置方式与出现Attempt to refer to a unregistered pool by its alias 'ums'异常的解决办法