首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >selenium和浏览器之间的连接正在断开,出现以下错误

selenium和浏览器之间的连接正在断开,出现以下错误
EN

Stack Overflow用户
提问于 2017-06-30 15:05:20
回答 1查看 222关注 0票数 0

当仅启动浏览器且未执行任何操作并退出浏览器时,出现以下错误。

代码语言:javascript
复制
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 105; received: 0
    at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:180) ~[httpcore-4.4.3.jar:4.4.3]
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.

当浏览器启动并执行1或2个操作并退出浏览器时。用于错误跟踪的PFB。

代码语言:javascript
复制
java.lang.ArrayIndexOutOfBoundsException: 123
        at org.openqa.selenium.internal.Base64Encoder.mapCharToInt(Base64Encoder.java:89)
        at org.openqa.selenium.internal.Base64Encoder.decode(Base64Encoder.java:76)
        at org.openqa.selenium.OutputType$2.convertFromBase64Png(OutputType.java:57)
        at org.openqa.selenium.OutputType$2.convertFromBase64Png(OutputType.java:55)
        at org.openqa.selenium.OutputType$3.convertFromBase64Png(OutputType.java:75)
        at org.openqa.selenium.OutputType$3.convertFromBase64Png(OutputType.java:73)
        at org.openqa.selenium.firefox.FirefoxDriver.getScreenshotAs(FirefoxDriver.java:343)
    10:59:31.659 [Firefox] ERROR c.c.zucchini.AbstractZucchiniTest - ERROR running test:
    cucumber.runtime.CucumberException: java.lang.ArrayIndexOutOfBoundsException: 123
        at com.comcast.zucchini.TestNGZucchiniRunner.runCukes(TestNGZucchiniRunner.java:80) ~[zucchini-2.2.9.jar:2.2.9]
        at com.comcast.zucchini.AbstractZucchiniTest.runWith(AbstractZucchiniTest.java:255) ~[zucchini-2.2.9.jar:2.2.9]
        at com.comcast.zucchini.TestRunner.run(TestRunner.java:51) [zucchini-2.2.9.jar:2.2.9]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 123
        at org.openqa.selenium.internal.Base64Encoder.mapCharToInt(Base64Encoder.java:89) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.internal.Base64Encoder.decode(Base64Encoder.java:76) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.OutputType$2.convertFromBase64Png(OutputType.java:57) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.OutputType$2.convertFromBase64Png(OutputType.java:55) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.OutputType$3.convertFromBase64Png(OutputType.java:75) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.OutputType$3.convertFromBase64Png(OutputType.java:73) ~[selenium-api-2.49.1.jar:na]
        at org.openqa.selenium.firefox.FirefoxDriver.getScreenshotAs(FirefoxDriver.java:343) ~[selenium-firefox-driver-2.49.1.jar:na]
EN

回答 1

Stack Overflow用户

发布于 2017-06-30 15:24:05

你能把代码发布到TestNGZucchiniRunner上吗?看起来它的数组有问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44840551

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档