搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

xul drag and drop function doesn't work Firefox 17 ESR but works in Firefox 10 ESR

  • 無回覆
  • 4 有這個問題
  • 12 次檢視
more options

I am having a problem with a xul drag and drop function designed for selenium rc and selenium IDE. It works in Firefox 10 ESR but does not work in Firefox 17 ESR.

the code used for the draganddrop function is added below:

Selenium.prototype.doXulDragAndDropToObject = function(locatorStartElement, locatorEndElement) { var startElement = this.page().findElement(locatorStartElement); if (startElement.wrappedJSObject) {

   startElement = startElement.wrappedJSObject;

}

var endElement = this.page().findElement(locatorEndElement); if (endElement.wrappedJSObject) {

   endElement = endElement.wrappedJSObject;

}

var dropValue;

var startTreerow = getAncestorsByTagName(startElement, 'treerow')[0]; var treeCells = startTreerow.children; for(var i=0; i<treeCells.length; i++) {

   var val = treeCells[i].getAttribute('value');
   if(val) {
       dropValue = JSON.parse(val);
   }

}

if(dropValue) {

   endElement.drop(dropValue);

} }

The is the error message I received when the draganddrop fails in FireFox 17 ESR:

[error] Unexpected Exception: message -> An attempt was made to use an object that is not, or is no longer, usable, code -> 11, 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, SECURITY_ERR -> 18, NETWORK_ERR -> 19, ABORT_ERR -> 20, URL_MISMATCH_ERR -> 21, QUOTA_EXCEEDED_ERR -> 22, TIMEOUT_ERR -> 23, INVALID_NODE_TYPE_ERR -> 24, DATA_CLONE_ERR -> 25, result -> 2152923147, name -> InvalidStateError, filename -> chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js, lineNumber -> 1183, columnNumber -> 0, location -> JS frame :: chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js :: :: line 1183, inner -> null, data -> null

firefox selenium-rc selenium-ide

I am having a problem with a xul drag and drop function designed for selenium rc and selenium IDE. It works in Firefox 10 ESR but does not work in Firefox 17 ESR. the code used for the draganddrop function is added below: Selenium.prototype.doXulDragAndDropToObject = function(locatorStartElement, locatorEndElement) { var startElement = this.page().findElement(locatorStartElement); if (startElement.wrappedJSObject) { startElement = startElement.wrappedJSObject; } var endElement = this.page().findElement(locatorEndElement); if (endElement.wrappedJSObject) { endElement = endElement.wrappedJSObject; } var dropValue; var startTreerow = getAncestorsByTagName(startElement, 'treerow')[0]; var treeCells = startTreerow.children; for(var i=0; i<treeCells.length; i++) { var val = treeCells[i].getAttribute('value'); if(val) { dropValue = JSON.parse(val); } } if(dropValue) { endElement.drop(dropValue); } } The is the error message I received when the draganddrop fails in FireFox 17 ESR: [error] Unexpected Exception: message -> An attempt was made to use an object that is not, or is no longer, usable, code -> 11, 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, SECURITY_ERR -> 18, NETWORK_ERR -> 19, ABORT_ERR -> 20, URL_MISMATCH_ERR -> 21, QUOTA_EXCEEDED_ERR -> 22, TIMEOUT_ERR -> 23, INVALID_NODE_TYPE_ERR -> 24, DATA_CLONE_ERR -> 25, result -> 2152923147, name -> InvalidStateError, filename -> chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js, lineNumber -> 1183, columnNumber -> 0, location -> JS frame :: chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js :: :: line 1183, inner -> null, data -> null firefox selenium-rc selenium-ide