SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.22k stars 8.11k forks source link

.sendKeys() throws ENAMETOOLONG with long strings in FF v46 on OSX #2164

Closed NSkelsey closed 5 years ago

NSkelsey commented 8 years ago

Meta

OS: OSX 10.11.5

Selenium Version: 2.53.2

Browser: Firefox

Browser Version: v46.0.1 (64-bit)

Expected Behavior

The string is input into a textarea in FF v46 on OSX without any issues.

Actual Behavior

sendKeys throws ENAMETOOLONG if the string is input all at once. It seems as if the textarea in the OSX FF webdriver is being treated like an input of type=file.

If individual characters are insert instead when a slash is encountered the following error is thrown:

1) test file consistency: uploaded and encrypted files should match downloaded and decrypted files
  Message:
    Failed: Uploading directories is not supported: /
  Stack:
    TypeError: Uploading directories is not supported: /

Steps to reproduce

Using node js generate a large string (>2000 chars) s and call .sendKeys(s) on a textarea

This testcase triggers the failure only on my local machine. Our testing infrastructure runs against around 10 different browsers and Firefox on OSX seems to be the only one with the problem.

Sample testcase

Issue originally reported here angular/protractor#3245

jleyba commented 8 years ago

Do you have a reduced test case that doesn't depend on protractor/angular?

mkallango commented 6 years ago

It is happen with Chrome too... doesn't have any workaround??

p0deje commented 6 years ago

A simple workaround would be to separate this into multiple send_keys calls.

Do you have a reduced test case that doesn't depend on protractor/angular?

vsravuri commented 6 years ago

I ran into this issue in Chrome.

I added these two lines in the beginning of the spec file to support remote file upload remote = require('protractor/node_modules/selenium-webdriver/remote'); browser.driver.setFileDetector(new remote.FileDetector());

The files are uploaded but later in other test cases the sendKeys failed if the input text is large. Looks like setFileDetector() has a limit of number of characters which caused the sendKeys to fail in other test cases.

This issue is easily reproducible if you are using setFileDetector.

djom202 commented 6 years ago

Hi,

I have the same issue just using a random text (chancejs) with above 300 chars of length on Chrome.

diemol commented 5 years ago

Closing this issue as no test case was provided by the OP.