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的更多相关文章

  1. 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 时总是无法打开对应的百度网址,页面如下所示:

  2. maven webcollector java.lang.ClassNotFoundException: org.openqa.selenium.remote.SessionNotFoundException

    使用webcollector时出现了如下异常 分析是依赖的问题,不仅要添加selenium-java,还要添加htmlunit-driver的依赖,注意不要添加成selenium-htmlunit-d ...

  3. org.openqa.selenium.remote.SessionNotFoundException: The FirefoxDriver cannot be used after quit() was called.

    该问题已经困扰了我很多天 问题终于解决了,全局变量导致的,碰到这种问题很难再自己本身的机器上发现错误,所以,应该看一下自己写的方法是否涉及到了全局变量出现不一致的情况,让其统一即可.

  4. 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 ...

  5. appium运行报错.<init>(Lorg/openqa/selenium/remote/ErrorCodes;Z)V

    最近这几天就在学习appium,搭建环境就耗费了很多时间,不得不承认自己够笨的了,然后我把环境搭建好,写完脚本的时候,就报这个错了,当时是从某个群里直接下载的demo,不得不吐槽说,够坑的,是能跑通, ...

  6. 解决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 ...

  7. 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 ...

  8. 【解决问题】failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer.

    failed: java.lang.RuntimeException: org.openqa.selenium.WebDriverException: Unexpected error launchi ...

  9. 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 ...

随机推荐

  1. 李炎恢《PHP第二季视频教程》之总结

    课时 <面向对象工具[1]>. 语法: __autoload.  __call.__tostring.__clone 1.   autoload 自动引用类.不用包含类,call屏蔽调用类 ...

  2. 解决Android studio导入项目卡死

    在使用Android studio的时候常常遇到这样的问题,从github或是其他地方导入项目,Android studio呈现卡死的现象!当遇到这种情况时,可以看看是下面那种情况,在按照方法来解决! ...

  3. shanquan2的两年三题系列

    好像只有2个月就退役啦 不管了,先说一下哪三题:多点求值.lcm.替罪羊树(bzoj3065) [upd0]2016.3.29 多点求值A掉啦,myy卡常数sxbk(不是说好的是shanquan2出的 ...

  4. React state的使用

    相对于angular.js的双向数据绑定,React 可以使用State来实现. React 里,只需更新组件的 state,然后根据新的 state 重新渲染用户界面(不要操作 DOM). this ...

  5. PXE+Kickstart+DHCP+TFTP实现无人值守安装操作系统

    PXE+Kickstart+DHCP+TFTP实现无人值守安装操作系统 PXE + Kickstart PXE的工作流程及配置文件 Kickstart的配置文件 Linux安装大致可以分为2个阶段 第 ...

  6. 【备忘】Conky配置

    贴配置: background yes use_xft yes xftfont Sans:size= xftalpha 0.8 update_interval own_window yes own_w ...

  7. SDN/NFV运营商商业化部署

    三大运营商发布未来网络架构,并逐步加快SDN/NFV商业化部署的步伐.中国联通发布其新一代网络架构<CUBE-Net 2.0白皮书>,并与20多家合作伙伴共同启动了“新一代网络”合作研发计 ...

  8. CentOS7下安装配置MariaDB

    参考: http://www.2cto.com/os/201504/394141.html http://outofmemory.cn/code-snippet/2533/mysql-create-d ...

  9. MVC 定时执行任务

    环境:.net4.5 需求:需要一个方法定时执行任务 解决: System.Threading.Timer 提供以指定的时间间隔执行方法的机制. 此类不能被继承,有10多种实例化方法,满足多种情况. ...

  10. mysqlDBA(1-3年)

    1.熟悉Aliyun操作系统的管理.配置和系统调优: 2.熟悉mysql管理 3.熟悉mysql主从复制,主主复制 4.熟悉数据库的备份策略,监控策略,性能测量策略 5.熟悉linux/unix操作系 ...