MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / testCanDefineNewCommands

Function testCanDefineNewCommands

javascript/webdriver/test/http/http_test.js:336–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

334}
335
336function testCanDefineNewCommands() {
337 executor.defineCommand('greet', 'GET', '/person/:name');
338
339 var command = new webdriver.Command('greet').
340 setParameter('name', 'Bob');
341
342 expectRequest('GET', '/person/Bob', {},
343 {'Accept': 'application/json; charset=utf-8'}).
344 $does(respondsWith(null, response(200, {}, '')));
345 control.$replayAll();
346
347 return assertSendsSuccessfully(command);
348}
349
350function testCanRedefineStandardCommands() {
351 executor.defineCommand(webdriver.CommandName.GO_BACK,

Callers

nothing calls this directly

Calls 6

respondsWithFunction · 0.85
responseFunction · 0.85
setParameterMethod · 0.80
expectRequestFunction · 0.70
assertSendsSuccessfullyFunction · 0.70
defineCommandMethod · 0.65

Tested by

no test coverage detected