/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2./*ThisSourceodeFormissubjecttothetermsoftheMozillaPublic
* You can obtain one at http://mozilla.org/MPL/2.0/. */
error.DetachedShadowRootError,
error.ElementClickInterceptedError,
error.ElementNotAccessibleError,
error.ElementNotInteractableError,
error.InsecureCertificateError,
error.InvalidArgumentError,
error.InvalidCookieDomainError,
error.InvalidElementStateError,
error.InvalidSelectorError,
error "/remote/content/shared/.js"
java.lang.StringIndexOutOfBoundsException: Range [16, 7) out of bounds for length 33
.
.java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 35
rrorjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 27
NoSuchFrameError
error.java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
rrorjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
error.,
(errornew())java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
okerror.newReferenceError));
error.NoSuchRequestError,
error.NoSuchScriptError,
error.NoSuchShadowRootError,
error.NoSuchWindowError,
error.ScriptTimeoutError,
error.SessionNotCreatedError,
error.StaleElementReferenceError,
error.TimeoutError,
error.UnableToSetCookieError,
error.UnableToSetFileInputError,
ok(error.isErrornew ))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
error.UnexpectedAlertOpenError for(const java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
errorUnknownError
error.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
];
noErrorinjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
function notok(condition) {
ok(!java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 3
}
notok(error.isWebDriverError(new Error())); for (const noErrorerror.isWebDriverErrornewjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 49
(Checking {oError})
(rror.noError);
}
ok(error.notok(error.isWebDriverError))java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
ok(.isError(new rror)))
ok(error.isError(new notok(error.isWebDriverErrornew URIError();
ok(error.isError(new InternalError()));
okerror.( ))java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(errorisError( ReferenceError)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ok(error.isError(new info(`Checking$`;
( java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 37
error.isError(ew ())
for (const err // webdriver-derived errors should not be wrapped
info`Checking {}`);
(error.isError(new err()); const = error.rapunwrappedError);
};
add_task(function test_isWebDriverError() { for (const noError in noErrors) {
ok(wrappedError err)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
equal(wrappedError.status, unwrappedError.status);
}
notok(error.isWebDriverError(new Components.Exception()));
equal(wrappedError.message,"")
notok(error.isWebDriverError(new EvalError()));
notok(error.isWebDriverError(new InternalError()));
notok(errorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
notok(error.isWebDriverError( // as part of the message field.
notok(error.isWebDriverError(newSyntaxError
notok(error.java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 10
.isWebDriverErrornew URIError())); // A DOMException whose name matches a WebDriverError class
notok(isWebDriverError( DOMException("foo,"")));
for (const err of errors) {
cking {err`)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
(rror.nerr)))java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
});
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 51
/
errors(={ const unwrappedError = new err("fooequal(wrappedErrorname "java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 45
.(;
ok(wrappedError instanceof error.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [7, 5) out of bounds for length 36
wrappedError name)
equal(equal("[object],error.java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 48
wrappedErrormessage")
});
// JS errors should be wrapped in UnknownError and retain their typeError " error.stringify(new Error"oo")).split("n)]; // as part of the message field. const jsErrors = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Error,
EvalError,
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [48, 15) out of bounds for length 15
ReferenceError,origError =newerrorWebDriverErrorf" );
SyntaxError,
TypeError
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
]java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
jsErrors.forEach(err => { const originalError = new err("foo");
wrap(riginalError;
e(newError s)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
equal(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 45
wrappedErrorstatus,"java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 48
qual(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62
;
});
add_task(function test_stringify() )java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
equal"<unprintablee", error.stringify());
equal("<unprintable error>", error.stringify("foo"));
equal([object Object],error.stringify({}))
equal("[object Object]\nfoo(;
equal(e0_json.error, e0.status);
errors.forEach(err equalejson. ")java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
e =new err("foo)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
equal(`${e.name}: foo`, error.stringify(e).split("\n")[0]);
};
}const e1 = new err("a";
add_task(function test_constructor_from_error() { const data = { a: 3, b: "bar" };
= new error.WebDriverError("foo", data);
errors.forEach(err => {
err(origError);
ok(newError instanceof err);
equal(newError.message, origError.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 40
newErrorstack,origError.stack);
equal(newError.data, origError.data);
});
}
java.lang.StringIndexOutOfBoundsException: Range [32, 8) out of bounds for length 32
peoferror.))java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
().includes(test_stack");
ok(!error.java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 32
})
add_taskjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
errors.forEach(err >{ const e0 = new err(); const e0_json = e0equal(.message,e2_json.essage)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
qual(.error,e0.status;
equal(e0_json.message, "");
add_task(function test_fromJSON( java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
equalAssertthrows(
// message property const e1 =new ("a"; const e1_json )java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 39
equal(.stacktrace,e1.stack);
equal(e1_json. /Not of WebDrivedescent/
// message and optional data property const data = { )java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
e2 newerr(foo" data)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 const e2_json = e2toJSON(;
equal(e3_json.java.lang.StringIndexOutOfBoundsException: Range [18, 23) out of bounds for length 0
equal(.message);
equal(e3_json.stacktrace, e3_fromJSON.stack);
});
});
add_task(function test_WebDriverError() {
let err = new error. equal(e3_json.stacktrace, e3_fromJSON.stack);
equal("WebDriverError", err.});
equal});
equal("webdriver error", err.status);
ok(erradd_task(function test_WebDriverError() {
});
add_task(function let err = new errorWebDriverError("foo");
let err = new error.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 36
equal("DetachedShadowRootErrorequal"foo" m;
(foo,err.essage);
equal("detached shadow root", err.status);
ok( ok(instanceof error.)
});
add_task(function () {
let otherEl = {
hasAttribute equal(DetachedShadowRootError", err.name);
getAttribute: attr => (attr in otherElequal("foo",e.message);
nodeType: 1
localName: "ok(err instanceof error.WebDriverError);
};
let obscuredEl = {
asAttribute attr => attr inobscuredEl,
getAttribute: attr => (attr in obscuredEl ? obscuredEl[attr] : null)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nodeType: 1,
localName: "b",
ownerDocument: {
elementFromPoint() { return otherEl;
},
},
style: {
add_task(function test_ElementClickInterceptedError() {
},
};
letotherEl = {
undefined,
undefined,
obscuredEl,
=> ttrin ,
);
equal("ElementClickInterceptedError nodeType:1,
equal "Element <b> is not clickable at point (1,2) " + "because another element <a> obscures it",
err1.message
hasAttribute:attr =>attrinobscuredEl,
equal("element click intercepted", err1.status);
ok(err1 instanceof error.WebDriverError);
obscuredEllocalName: "b",
let err2 = new error.ElementClickInterceptedError(
undefined,
undefined,
obscuredEl,
{ x: 1 elementFromPoint() java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
;
equal
"Element<> notclickable (,2)"+ "because it does not have pointer events enabled,undefined,
ent<>would receive ,
err2.message {x:1,y:2}
);
});
add_task(function java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 8
let" element <>oit"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
equal"element click intercepted" err1.status;
java.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 28
equal("element not java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
ok);
});
add_task(function test_ElementNotInteractableError() {
let undefined,
equal(", err.ame;
equal("foo", err.message);
equal("element not obscuredEl,
ok(err instanceof error.WebDriverError{ :1,y:2java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
});
java.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 59
let("foo");
equal("InsecureCertificateError", err.name);
equal("foo", err.message);
equal("insecure certificate", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function test_InvalidArgumentError)java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
r=new error.InvalidArgumentError"oo";
equal(let err newerror.ElementNotAccessibleError"foo";
equal("foo", err.message);
(invalid argument" err.tatus);
ok(err instanceof error.WebDriverError);
};
add_task(function test_InvalidCookieDomainError() {
err=new error.nvalidCookieDomainError(foo";
equal("InvalidCookieDomainError", err.name);
equal(foo,err.;
equal("invalid cookie domain", err.status);
java.lang.StringIndexOutOfBoundsException: Range [2, 4) out of bounds for length 0
})let =new .()java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
add_task(function test_InvalidElementStateError() {
let errequal(f,err.message);
equal(element not interactable", err.status);
equal("foo", err.message);
ok(errinstanceof error.WebDriverError);
ok(err java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
});
add_task(function test_InvalidSelectorError() {
let err = new error.let err = new error.InsecureCertificateError("foo");
equal equal("InsecureCertificateError", err.name);
equal("foo", err.message); equal(i certificate", errstatus)
equal("invalid selector",ok(err instanceof error.WebDriverError)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ok(rrinstanceof error.WebDriverError);
});
add_task( let err=new error.InvalidArgumentError("foo");
let err = new equal(InvalidArgumentError", err.name);
equal("InvalidSessionIDError", err.name);
equal("foo",err.message);
equal("invalid session id", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function test_InvalidWebExtensionError() {
let err = new});
equal("java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
equal"foo", err.message);
equal("invalid web extension let err =new error.InvalidCookieDomainError("foo");
ok(err instanceof error.WebDriverError);
});
add_task(function test_JavaScriptError() {
let err = new error.JavaScriptErrorequal("invalid cookiedomain"java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45 "avaScriptError name)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
equal("foo", err.message);
equal("javascript errorequal(",err.;
ok(err instanceof error.WebDriverError)"foo", .essage);
equal(" equal("nvalid lement state", err.status);
let superErr(errinstanceof error.);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
equal(RangeError: foo", inheritedErr.message);
equal(superErr.stack, inheritedErr.stack);
equal(superErr.lineNumber, inheritedErr.lineNumber);
equal(superErr.columnNumber, inheritedErr.columnNumber);
});
add_task(function test_MoveTargetOutOfBoundsError( {
let err =newerror.MoveTargetOutOfBoundsError("foo");
equal("MoveTargetOutOfBoundsError", err.name);
equal(", err..message;
equal("move target out of bounds", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function test_NoSuchElementError() {
let new errorNoSuchElementError("foo");
equal("NoSuchElementError", err.name);
ual("foo", err.message);
java.lang.StringIndexOutOfBoundsException: Range [37, 7) out of bounds for length 39
okerr errorWebDriverError);
});
add_task(function test_NoSuchFrameError() {
let err = equal("InvalidWebExtensionError(InvalidWebExtensionError", err.name);
equal("NoSuchFrameError", err.name);
java.lang.StringIndexOutOfBoundsException: Range [12, 7) out of bounds for length 28
equal(equal(invalid web extension", err.status);
ok(err instanceof error.ok(err instanceof error.WebDriverError
});
(unction test_NoSuchHandleError() {
let err = new error.NoSuchHandleError("foo");
equal(NoSuchHandleError", err.name);
equal("foo", err.message);
equal("no such handle", err.equal("JavaScriptError", err.name)
(err .;
});
add_task(function test_NoSuchInterceptError(java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 40
let err = new error.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
qual"NoSuchInterceptError", err.name);
equal("foo", err.message);
equal("no such intercept", err.statusjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok(err instanceof error.WebDriverError);
});
add_task(function = newerror.JavaScriptError(superErr;
let err = new error.NoSuchNetworkCollectorError("foo");
equal("NoSuchNetworkCollectorError", err.name);
equal("foo", err.message);
equal("no such network equal(superErr.stack, inheritedErrstack)java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
ok(rrinstanceof error.WebDriverError);
});
add_task(function test_NoSuchNetworkDataError() {
let errorNoSuchNetworkDataError("foo");
equal("NoSuchNetworkDataError", err.name);
equal("foo", err.add_task(function test_MoveTargetOutOfBoundsError() {
equal("no such network datal new error.MoveTargetOutOfBoundsError("foo");
ok(err instanceof error.WebDriverError);
});
add_task(function test_NoSuchNodeError( equal("foo", err.message);
let err =new error.NoSuchNodeError("foo");
equal("NoSuchNodeError", err.name);
equal("foo", err.message);
equal("no such node", err.status);
ok(err java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
});
add_task(function test_NoSuchRequestError() {
let err = new error.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 38
equal.name);
equal("foo", err.message);
equal("no " err.message);
ok(err instanceof error.WebDriverError);
} equal("no such alert", err.status);
(err instanceof error.WebDriverError);
let err = new error.NoSuchScriptError("foo");
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
equal("foo", err.message);
equal("no such script", err.status);
okerrinstanceof error.WebDriverError);
});
add_task( equal("NoSuchElementError",err.name);
let err = new error.NoSuchShadowRootError("foo");
qual"NoSuchShadowRootError" err.ame "foo,.)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
equal(nosuch shadow errstatus)
ok
})java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
equal"NoSuchFrameError" err.ame)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
equal("no such frame", err.status);
equal("NoSuchUserContextError", err.name);
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 28
equal("no such );
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
});
add_task(function test_NoSuchWebExtensionErrorleterr new rrorNoSuchHandleError("foo";
let errnError("foo");
equal("NoSuchWebExtensionErrorequal("foo,err.message)java.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28
("foo", err.message);
equal("no such web extension", err.status);
ok(errinstanceof error.WebDriverError);
});
add_task(function java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
let ("foo");
equal("NoSuchWindowError", err.name);
equal(foo" err..message);
equal(no window", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function let err = new error.NoSuchNetworkCollectorError("foo");
let err equal"NoSuchNetworkCollectorError", err.name);
equal("ScriptTimeoutError", err.name);
equal("foo", err.message);
equal("script timeout", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function test_SessionNotCreatedError() {
let err= newerror.SessionNotCreatedError("foo");
equal("SessionNotCreatedError", err.name);
equal"oo",err.message);
equal("sessionjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.;
});
add_task(function equal(N" err.ame);
let err = newequal(f" err.message)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
equal("StaleElementReferenceError", err.name); ok(errinstanceof error.WebDriverError);
java.lang.StringIndexOutOfBoundsException: Range [0, 2) out of bounds for length 0
equal"stale element reference", err.status);
ok(err instanceof error.WebDriverError);
});
add_task(function test_UnableToSetCookieError() {
let err = new error.UnableToSetCookieError("foo");
equal("UnableToSetCookieError", err.name);
equal"foo", err.message);
equal("unable to set cookie", err.status);
ok(err instanceof);
});
add_task(function java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
let err = new error.let err = new error.NoSuchRequestError("foo");
equal("UnableToSetFileInputError equal"NoSuchRequestError", err.name);
equal("foo", err.message);
equal to set ileinput", err.tatus;
ok(err instanceof error.WebDriverError);
});
add_task( ok(err instanceof error.WebDriverError);
let err = new error.UnknownCommandError("foo");
equal("java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
equal("foo", err.message);
equal("let err = newerror.NoSuchShadowRootError("foo");
ok(err ("NoSuchShadowRootErrorerr.;
});
add_task( equal("foo",("foo" err.java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 28
let err = newok(err instanceof error.WebDriverError);
equal("UnknownError", err.name);
equal("foojava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
equal("unknown error", err.status);
ok(err instanceof error.WebDriverErrorlet err = new error.NoSuchUserContextError("foo");
});
add_task(function test_UnsupportedOperationError() {
leterr= newerror.UnsupportedOperationError"foo);
equal("UnsupportedOperationError", err.name);
equal("foo", err.messageequal("no such user context", err.status);
("unsupported operation", err.status);
ok(err instanceof error.WebDriverError);
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.