7

This used to work in the past, but recently I've been trying to upload a file using Selenium IDE, and now I'm getting this error:

[error] Unexpected Exception: code -> 1000, INDEX_SIZE_ERR -> 1, DOMSTRING_SIZE_ERR -> 2, HIERARCHY_REQUEST_ERR -> 3, WRONG_DOCUMENT_ERR -> 4, INVALID_CHARACTER_ERR -> 5, NO_DATA_ALLOWED_ERR -> 6, NO_MODIFICATION_ALLOWED_ERR -> 7, NOT_FOUND_ERR -> 8, NOT_SUPPORTED_ERR -> 9, INUSE_ATTRIBUTE_ERR -> 10, INVALID_STATE_ERR -> 11, SYNTAX_ERR -> 12, INVALID_MODIFICATION_ERR -> 13, NAMESPACE_ERR -> 14, INVALID_ACCESS_ERR -> 15, VALIDATION_ERR -> 16, TYPE_MISMATCH_ERR -> 17, DATA_CLONE_ERR -> 25, message -> Security error, result -> 2152924136, name -> NS_ERROR_DOM_SECURITY_ERR, filename -> chrome://selenium-ide/content/selenium-core/scripts/atoms.js, lineNumber -> 8911, columnNumber -> 0, location -> JS frame :: chrome://selenium-ide/content/selenium-core/scripts/atoms.js :: :: line 8911, inner -> null, data -> null

The commands I'm using are:

Command: type
Target: //*[locator]
Value: path/to/file

Is anyone else having this problem?

Anne
  • 26,765
  • 9
  • 65
  • 71
ngtran
  • 73
  • 1
  • 1
  • 4

2 Answers2

5

This only affect FF8

Bug report and a suggested fix here:

Issue 2826: type command fails with security error in Firefox 8 for file inputs

Pi Delport
  • 10,356
  • 3
  • 36
  • 50
chim
  • 8,407
  • 3
  • 52
  • 60
2

By using Selenium IDE, We can't Upload A file.... while Uploading a file we have to get a file from Windows Application...IDE can't Manage Windows File, we can use IDE for Only Web based apps. It's Better to Use Auto It script for Uploading a file in Selenium RC.

nani
  • 21
  • 1
  • 4
    I don't think this is true. If you "type" the file path into `` element, it should work... – Petr Janeček Apr 30 '12 at 09:22
  • Here (http://stackoverflow.com/questions/8149403/selenium-ide-1-4-1-throwing-security-error-when-uploading-a-local-file?rq=1) they show how to do it. – Purefan Nov 26 '13 at 16:20
  • 1
    @PetrJaneček - I was like you (thinking it can be done the way that you mention) but it doesn't work. I've tried all combinations of setting the "file" type control with the value of the local file and it can't be uploaded. I'm still looking for the solution as everyone says it is possible. – GIZNAJ Jun 27 '17 at 19:02