selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Multiple commands not handled correctly

Open AnnemarieD opened this issue 9 years ago • 5 comments

Meta -

OS:
Windows 10, OSX

Selenium Version:
3.4.0 Browser:
Chrome

If the issue is with Google Chrome consider logging an issue with chromedriver instead: https://sites.google.com/a/chromium.org/chromedriver/help ==> considered this but suspecting the issue to lie with Selenium

Browser Version:
62.0

Expected Behavior -

When running my automated tests (setup is Webdriver IO, NodeJS) I expect the tests to be able to return data for each element in a list.

Actual Behavior -

I get an error:

java.net.SocketException: Connection reset by peer
Error: An unknown server-side error occurred while processing the command.
    at elementIdText("0.11610570931673014-20") - getText.js:35:50

With the following in the Selenium logs:

16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-15/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-16/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-17/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-18/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-19/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/element/0.11610570931673014-20/text"
[16:35:37]  DATA                {}
[16:35:37]  COMMAND     GET      "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f/screenshot"
[16:35:37]  DATA                {}
[16:35:37]  RESULT              "€ 1.367"
[16:35:38]  RESULT              "€ 478"
[16:35:38]  RESULT              "€ 6.203"
[16:35:39]  RESULT              "iVBORw0KGgoAAAANSUhEUgAABLAAAAP7CAIAAADEe+C5AAAgAElEQVR4nOzdf3xT1f0/8Bc05ra0aaspVBZmoZ2lVNb4hQ+ZYKtgpdJMfuQzflTFIkiZPyIqZWrcxMI2M5xx08WplMmoOAtln4idqZZBGa3yWfzATIcl1E8r5UNkhWa2DaW9McHvH0nbtE1/QSvFvJ5 ... (135478 more bytes)
[16:35:39]      Saved screenshot: ERROR_chrome_2017-11-21T15-35-37.953Z.png
[16:35:39]  RESULT              "€ 1.367"
[16:35:39]  RESULT              "€ 2.466"
[16:35:39]  COMMAND     DELETE   "/wd/hub/session/8921cdb34a96ea7ad1a5383c3220f10f"
[16:35:39]  DATA                {}

Steps to reproduce -

Above logs show the result for a specific test case where I perform a getText command on a list of 6 items. The getText command is executed 6 times, 3 results are returned, it is decided that something went wrong and a screenshot is made and the test failed, 2 more responses are returned, and finally the session is deleted.

AnnemarieD avatar Nov 21 '17 15:11 AnnemarieD

This also happens on Selenium 3.5.2.

toien44 avatar Nov 21 '17 16:11 toien44

Please report this issue to WebdriverIO tracker, it's an independent project, WebdriverIO is not developed by Selenium team.

barancev avatar Nov 21 '17 17:11 barancev

Discussed this issue on Webdriver IO Gitter already. Seems to be a problem with Chromedriver. We suspected Selenium sending a command to get text to Chromedriver too many times. Will report the issue with Chromedriver.

AnnemarieD avatar Nov 22 '17 18:11 AnnemarieD

Ah, that’s here as well... Can someone please take another look at this problem?

AnnemarieD avatar Nov 22 '17 18:11 AnnemarieD

@barancev I think WebdriverIO is just partially responsible for this. The problem here is that the selenium server can't handle a certain amount of parallel requests at the same time. It would be great if this could be better defined in the protocol.

Will report the issue with Chromedriver.

@AnnemarieD yes, please do that. WebdriverIO already has an issue to throttle requests / queue them if too many are sent at once.

christian-bromann avatar Nov 23 '17 09:11 christian-bromann