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

Method OnCreate

cpp/iedriver/IECommandExecutor.cpp:71–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69};
70
71LRESULT IECommandExecutor::OnCreate(UINT uMsg,
72 WPARAM wParam,
73 LPARAM lParam,
74 BOOL& bHandled) {
75 LOG(TRACE) << "Entering IECommandExecutor::OnCreate";
76
77 CREATESTRUCT* create = reinterpret_cast<CREATESTRUCT*>(lParam);
78 IECommandExecutorThreadContext* context = reinterpret_cast<IECommandExecutorThreadContext*>(create->lpCreateParams);
79 this->port_ = context->port;
80
81 // NOTE: COM should be initialized on this thread, so we
82 // could use CoCreateGuid() and StringFromGUID2() instead.
83 UUID guid;
84 RPC_WSTR guid_string = NULL;
85 RPC_STATUS status = ::UuidCreate(&guid);
86 status = ::UuidToString(&guid, &guid_string);
87
88 // RPC_WSTR is currently typedef'd in RpcDce.h (pulled in by rpc.h)
89 // as unsigned short*. It needs to be typedef'd as wchar_t*
90 wchar_t* cast_guid_string = reinterpret_cast<wchar_t*>(guid_string);
91 this->SetWindowText(cast_guid_string);
92
93 std::string session_id = StringUtilities::ToString(cast_guid_string);
94 this->session_id_ = session_id;
95 this->is_valid_ = true;
96
97 ::RpcStringFree(&guid_string);
98
99 this->PopulateElementFinderMethods();
100 this->current_browser_id_ = "";
101 this->serialized_response_ = "";
102 this->unexpected_alert_behavior_ = "";
103 this->implicit_wait_timeout_ = 0;
104 this->async_script_timeout_ = DEFAULT_SCRIPT_TIMEOUT_IN_MILLISECONDS;
105 this->page_load_timeout_ = DEFAULT_PAGE_LOAD_TIMEOUT_IN_MILLISECONDS;
106 this->reattach_browser_timeout_ = DEFAULT_BROWSER_REATTACH_TIMEOUT_IN_MILLISECONDS;
107 this->is_waiting_ = false;
108 this->is_quitting_ = false;
109 this->is_awaiting_new_window_ = false;
110 this->use_strict_file_interactability_ = false;
111 this->page_load_strategy_ = "normal";
112 this->file_upload_dialog_timeout_ = DEFAULT_FILE_UPLOAD_DIALOG_TIMEOUT_IN_MILLISECONDS;
113
114 this->managed_elements_ = new ElementRepository();
115 this->input_manager_ = new InputManager();
116 this->proxy_manager_ = new ProxyManager();
117 this->factory_ = new BrowserFactory();
118 this->element_finder_ = new ElementFinder();
119 this->command_handlers_ = new CommandHandlerRepository();
120
121 this->is_edge_chromium_ = false;
122 this->edge_temp_dir_ = L"";
123
124 return 0;
125}
126
127LRESULT IECommandExecutor::OnDestroy(UINT uMsg,
128 WPARAM wParam,

Callers

nothing calls this directly

Calls 2

LOGClass · 0.50

Tested by

no test coverage detected