gpt4 book ai didi

selenium - WebDriver异常: unknown error: unable to unzip 'file' when I attached file with russian name

转载 作者:行者123 更新时间:2023-12-03 06:36:33 25 4
gpt4 key购买 nike

我的 Selenium 化物测试因 WebDriverException 失败:未知错误:当它尝试发送并附加西里尔文名称“золотыещенки.png”的文件时,无法解压缩"file" Selenoid .

unknown error: unable to unzip 'file'
from unknown error: archive error: (unknown error: could not unzip archive), entry error: (unknown error: invalid data descriptor signature)
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.13.9-coreos x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds

在此之前,它已成功附加带有纬度名称和数字的所有其他文件。

在代码中,它看起来像这样:$(locator).shouldBe(Condition.visible).scrollTo().sendKeys(file.getAbsolutePath());

最佳答案

UPD:所有图像中均已修复此问题 - 生成了所有 UTF-8 编码。应该使用最新的图像。

<小时/>

这是因为missing浏览器图像中的西里尔字母编码。临时解决方法是使用以下 Dockerfile 手动构建镜像:

FROM selenoid/vnc:chrome_60.0

USER root
RUN locale-gen ru_RU.UTF-8
ENV LANG ru_RU.UTF-8
ENV LANGUAGE ru:en
ENV LC_ALL ru_RU.UTF-8
USER selenium

关于selenium - WebDriver异常: unknown error: unable to unzip 'file' when I attached file with russian name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47050742/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com