我在黄瓜量角器中进行了一些自动化测试,但是从今天早上开始,“browser.takeScreenshot”方法突然失败,并出现以下错误:
WebDriverError: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a
href="/wd/hub/session/29068642-008c-4e84-9f12-
e2896a9c6b3e/screenshot">GET /wd/hub/session/29068642-008c-4e84-
9f12-e2896a9c6b3e/screenshot</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p>
</p>
</body></html>
更新:它在本地工作,只有当我在 selenium 服务器上运行测试时才会出现问题。