Selenium报错-浏览器放大比例需要设置为100%

在使用Selenium自动化测试时遇到问题,浏览器的放大比例不为100%会导致元素定位失败。解决方法是设置浏览器启动参数,确保启动时比例正确,以保证测试的准确性和稳定性。
摘要由CSDN通过智能技术生成



[TestNG] Running:
  C:\Users\wwwxs\AppData\Local\Temp\testng-eclipse-163890489\testng-customsuite.xml


Started InternetExplorerDriver server (32-bit)
2.40.0.0
Listening on port 38740
FAILED: test_ie
org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 85%. It should be set to 100% (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6.17 seconds
Build info: version: '2.40.0', revision: 'fbe29a9', time: '2014-02-19 20:54:28'
System info: host: 'wangfan-NB', ip: '192.168.31.193', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_51'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值