1 Replies Last post: Jan 14, 2009 9:25 AM by Eugene  
Tomasz Bak Beginner 1 posts since
Sep 30, 2008
Currently Being Moderated

Sep 30, 2008 1:50 PM

Upload file with create.sel

Hi, I have troubles to upload fule with selenium, which is nececery to test object creation with create.sel like this:

 

|open|/|
|type|tag_list|ruby on rails|
|type|document_uploaded_data|C:\Documents and Settings\tb\Pulpit\Ruby on Rails.htm|
|clickAndWait|document_submit|
|assertTitle|Documents: index|

 

I have google and applied  “signed.applets.codebase_principal_support” set to the value “true”

and netscape.security.PrivilegeManager.enablePrivilege(”UniversalFileRead”);

form http://cakebaker.wordpress.com/2006/03/29/file-upload-with-selenium/

 

However when I open http://localhost:3000/selenium/TestRunner.html?test=tests

and run the test i get:

Selenium failure. Please report to selenium-dev@openqa.org, with error details from the log window.  The error message is: Security error

(see this screenshot: http://img215.imageshack.us/my.php?image=seleniumfileuploaderroraj4.png)

 

and in logs:

  • error: Unexpected Exception: Security error
  • error: Exception details: message -> Security error, 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, result -> 2152924136, name -> NS_ERROR_DOM_SECURITY_ERR, filename -> http://localhost:3000/selenium/scripts/selenium-browserbot.js, lineNumber -> 1245, columnNumber -> 0, location -> [htmlutils: ack! couldn't read this property! (Permission Denied?)], inner -> null, data -> null
  • warn: currentTest.recordFailure: Selenium failure. Please report to selenium-dev@openqa.org, with error details from the log window. The error message is: Security error

 

I use Firefox 3.0.3 and selenium-core-0.8.3.

 

 

Cheers,

Tom

Eugene Advanced 58 posts since
Jun 4, 2008
Currently Being Moderated
1. Jan 14, 2009 9:25 AM in response to: Tomasz Bak
Re: Upload file with create.sel

Hi.

 

If element locator belongs to other iframe proper iframe should be selected first:

 

|selectFrame|frame_locator|

|type|element_locator|some_text|

More Like This

  • Retrieving data ...