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

Method AddArguments

cpp/iedriver/Script.cpp:662–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662int Script::AddArguments(IElementManager* element_manager, const Json::Value& arguments) {
663 LOG(TRACE) << "Entering Script::AddArguments";
664
665 int status_code = WD_SUCCESS;
666
667 // Calling vector::resize() is okay here, because the vector
668 // should be empty when Initialize() is called, and the
669 // reallocation of variants shouldn't give us too much of a
670 // negative impact.
671 this->argument_array_.resize(arguments.size());
672
673 for (UINT arg_index = 0; arg_index < arguments.size(); ++arg_index) {
674 Json::Value arg = arguments[arg_index];
675 status_code = this->AddArgument(element_manager, arg);
676 if (status_code != WD_SUCCESS) {
677 break;
678 }
679 }
680
681 return status_code;
682}
683
684int Script::AddArgument(IElementManager* element_manager, const Json::Value& arg) {
685 LOG(TRACE) << "Entering Script::AddArgument";

Callers 2

ExecuteMethod · 0.95
OnExecuteScriptMethod · 0.45

Calls 3

AddArgumentMethod · 0.95
LOGClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected