org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE
1.在启动ie浏览器前先加入属性设置一项:
DesiredCapabilities ie = DesiredCapabilities.internetExplorer();
ie.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); System.setProperty("webdriver.ie.driver", "e:/IEDriverServer.exe");
driver = new InternetExplorerDriver(ie);
2.如果加入属性项返回“This is the initial start page for the WebDriver server.” 则说明你浏览器进行了缩放,具体如报错:
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 125%. It should be set to 100% (WARNING: The server did not provide any stacktrace information)
解决方案:将IE浏览器缩放比例设置成100% 页面→缩放,选择100%,再次运行即可。
org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launch IE的更多相关文章
- Selenium2学习-037-WebUI自动化实战实例-IE浏览器显示比例问题:org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer. Browser zoom level was set to 94%. It should be set to 100%
好久没有写博文了,今天在给部门新人演示 Selenium WebDriver 启动其支持的各种浏览器时,启动 IE 时总是无法打开对应的百度网址,页面如下所示:
- maven webcollector java.lang.ClassNotFoundException: org.openqa.selenium.remote.SessionNotFoundException
使用webcollector时出现了如下异常 分析是依赖的问题,不仅要添加selenium-java,还要添加htmlunit-driver的依赖,注意不要添加成selenium-htmlunit-d ...
- org.openqa.selenium.remote.SessionNotFoundException: The FirefoxDriver cannot be used after quit() was called.
该问题已经困扰了我很多天 问题终于解决了,全局变量导致的,碰到这种问题很难再自己本身的机器上发现错误,所以,应该看一下自己写的方法是否涉及到了全局变量出现不一致的情况,让其统一即可.
- org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or br
WARN <init>, HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF R ...
- appium运行报错.<init>(Lorg/openqa/selenium/remote/ErrorCodes;Z)V
最近这几天就在学习appium,搭建环境就耗费了很多时间,不得不承认自己够笨的了,然后我把环境搭建好,写完脚本的时候,就报这个错了,当时是从某个群里直接下载的demo,不得不吐槽说,够坑的,是能跑通, ...
- 解决selenium 启动ie浏览器报错:Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones
启动ie代码: System.setProperty("webdriver.ie.driver", "bin/IEDriverServer.exe"); Web ...
- selenium2Library报错: Unexpected error launching Internet Explorer. Browser zoom level was set to 119%. It should be set to 100%
Exception in thread "main" org.openqa.selenium.remote.SessionNotFoundException: Unexpected ...
- 【解决问题】failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer.
failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launchi ...
- selenium启动IE失败,并报错:Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones
1.selenium去启动IE时,报错: Started InternetExplorerDriver server (32-bit)2.50.0.0Listening on port 24641On ...
随机推荐
- 深入理解jsonp跨域请求原理
在进行网站开发的过程中经常会用到第三方的数据,但是由于同源策略的限制导致ajax不能发送请求,因此也无法获得数据.解决ajax的跨域问题有两种方法: 一.jsop 二.XMLHttpRequest2中 ...
- Android开发 default activity not found
新建的项目,今天打开的时候,发现无法编译了.编译按钮无法点击,必须edit configuration.并且报错 default activity not found. 解决: 少写了一个" ...
- calendar的一些操作
一.通过分析日期函数,根据日期进行一系列操作,例如:我们需要知道2个时间段中所有的日期等等. 由于Calendar 类是一个抽象类,因此我们不能通过new来获取该对象的实例.我们可以通过其类方法 ge ...
- 使用Navicat Preminum时,发现的几个好用的功能
- 适配ios9出现的问题:-canOpenURL: failed for URL
-canOpenURL: failed for URL: "wtloginmqq2://qzapp" - error: "(null)" 2015-09-13 ...
- BZOJ 3288: Mato矩阵
Description 一个 \(n*n\) 行列式,\((i,j)=gcd(i,j)\) Sol 线性筛. 这道题神奇的筛出来 \(phi\) ... 打表可以发现,一个数会被他所有的因子减掉因子的 ...
- windows 上vmare超卡的问题解决方案
http://www.cnblogs.com/jlwen/p/3553722.html
- 错误:找不到请求的 .Net Framework Data Provider。可能没有安装.
一.错误描述 今天在帮同事Debug的时候遇到这个问题,错误信息提示到是Data Provider的问题,首先我们看下环境. 数据库版本:Oracle 11.2.0.4.0 64位 数据库服务器:li ...
- AtomicBoolean介绍与使用
java.util.concurrent.atomic.AtomicBoolean 继承自Object. 介绍: 在这个Boolean值的变化的时候不允许在之间插入,保持操作的原子性 方法和举例 ...
- pwd命令
[pwd] 打印当前的工作目录 pwd==print work director 命令格式: pwd [OPTION]... 命令功能: 打印当前工作目录的全路径 命 ...