SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

selenium.type() is failing the set the value to an input field with type=file #7802

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 7802

I use Selenium.type(xpath, url), for a 'input' field having type=file in Chrome browser,
I get an error
ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users
for error details from the log window.  The error message is: Failed to set the 'value'
property on 'HTMLInputElement': This input element accepts a filename, which may only
be programmatically set to the empty string.

Selenium version: 2.42.2
OS: Window 7
Browser: Google Chrome
Browser version: 37.0.2062.102 m

----------------------------
My log:
...
09:36:05.784 INFO - Got result: OK,//div[@id='upload-video-popup'][@style='z-ind
ex: 2000; display: block;'] on session 6e71123d8d354f3db75d83e406ee1bf5
09:36:05.786 INFO - Command request: isElementPresent[//div[@id='upload-video-po
pup'][@style='z-index: 2000; display: block;'], ] on session 6e71123d8d354f3db75
d83e406ee1bf5
09:36:05.947 INFO - Got result: OK,true on session 6e71123d8d354f3db75d83e406ee1
bf5
09:36:05.949 INFO - Command request: getExpression[//input[@id='videoName'], ] o
n session 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.108 INFO - Got result: OK,//input[@id='videoName'] on session 6e71123d8
d354f3db75d83e406ee1bf5
09:36:06.110 INFO - Command request: getExpression[video 1, ] on session 6e71123
d8d354f3db75d83e406ee1bf5
09:36:06.268 INFO - Got result: OK,video 1 on session 6e71123d8d354f3db75d83e406
ee1bf5
09:36:06.279 INFO - Command request: type[//input[@id='videoName'], video 1] on
session 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.440 INFO - Got result: OK on session 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.442 INFO - Command request: getExpression[//input[@id='fileVideo'], ] o
n session 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.601 INFO - Got result: OK,//input[@id='fileVideo'] on session 6e71123d8
d354f3db75d83e406ee1bf5
09:36:06.613 INFO - Command request: getExpression[D:\Project\AutomationTest\Aut
omationSVN\VO\VirtualOfficeProject\protected\tests\functional\FileTest\video\[WM
V]Winter's Tale - Official Trailer #2 (2014) HD.wmv, ] on session 6e71123d8d354f
3db75d83e406ee1bf5
09:36:06.772 INFO - Got result: OK,D:\Project\AutomationTest\AutomationSVN\VO\Vi
rtualOfficeProject\protected\tests\functional\FileTest\video\[WMV]Winter's Tale
- Official Trailer #2 (2014) HD.wmv on session 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.774 INFO - Command request: type[//input[@id='fileVideo'], D:\Project\A
utomationTest\AutomationSVN\VO\VirtualOfficeProject\protected\tests\functional\F
ileTest\video\[WMV]Winter's Tale - Official Trailer #2 (2014) HD.wmv] on session
 6e71123d8d354f3db75d83e406ee1bf5
09:36:06.941 INFO - Got result: ERROR: Command execution failure. Please search
the user group at https://groups.google.com/forum/#!forum/selenium-users for err
or details from the log window.  The error message is: Failed to set the 'value'
 property on 'HTMLInputElement': This input element accepts a filename, which ma
y only be programmatically set to the empty string. on session 6e71123d8d354f3db
75d83e406ee1bf5

Reported by tmdinh91 on 2014-08-29 02:57:31

lukeis commented 8 years ago

Reported by barancev on 2014-08-29 06:09:28

lukeis commented 8 years ago

Reported by barancev on 2014-08-29 10:14:06

lukeis commented 8 years ago
Reproduced. But RC is deprecated and so priority is low.

Reported by barancev on 2014-08-29 19:01:57

lukeis commented 8 years ago
Selenium RC is deprecated and the support of Selenium RC is discontinued.

Selenium team is not going to fix remaining issues in Selenium RC and we don't accept
new issue reports on Selenium RC.

On the other side, we continue to accept pull requests and patches from the community.

Reported by barancev on 2015-03-12 21:15:48

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:24:22