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

Method KeyUp

cpp/iedriver/InputManager.cpp:581–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579}
580
581int InputManager::KeyUp(BrowserHandle browser_wrapper,
582 const Json::Value& up_action,
583 InputState* input_state) {
584 int status_code = WD_SUCCESS;
585 std::string key_value = up_action["value"].asString();
586 std::wstring key = StringUtilities::ToWString(key_value);
587
588 if (!this->IsSingleKey(key)) {
589 return EINVALIDARGUMENT;
590 }
591
592 if (!this->action_simulator_->UseExtraInfo()) {
593 HWND window_handle = browser_wrapper->GetContentWindowHandle();
594 this->AddKeyboardInput(window_handle, key, true, input_state);
595 }
596 return status_code;
597}
598
599bool InputManager::IsSingleKey(const std::wstring& input) {
600 bool is_single_key = true;

Callers 1

PerformInputSequenceMethod · 0.95

Calls 5

IsSingleKeyMethod · 0.95
AddKeyboardInputMethod · 0.95
asStringMethod · 0.80
UseExtraInfoMethod · 0.45

Tested by

no test coverage detected