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

Method Wait

cpp/iedriver/HtmlDialog.cpp:128–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128bool HtmlDialog::Wait(const std::string& page_load_strategy) {
129 LOG(TRACE) << "Entering HtmlDialog::Wait";
130 // If the window is no longer valid, the window is closing,
131 // and the wait is completed.
132 if (!this->is_closing() && !this->IsValidWindow()) {
133 return true;
134 }
135
136 // Check to see if a new dialog has opened up on top of this one.
137 // If so, the wait is completed, no matter whether the OnUnload
138 // event has fired signaling navigation started, nor whether the
139 // OnLoad event has fired signaling navigation complete. Set the
140 // flag so that the Wait method is no longer called.
141 HWND child_dialog_handle = this->GetActiveDialogWindowHandle();
142 if (child_dialog_handle != NULL) {
143 this->is_navigating_ = false;
144 this->set_wait_required(false);
145 return true;
146 }
147
148 // Otherwise, we wait a short amount and see if navigation is complete
149 // (signaled by the OnLoad event firing).
150 ::Sleep(250);
151 return !this->is_navigating_;
152}
153
154HWND HtmlDialog::GetContentWindowHandle() {
155 LOG(TRACE) << "Entering HtmlDialog::GetContentWindowHandle";

Callers

nothing calls this directly

Calls 5

IsValidWindowMethod · 0.95
is_closingMethod · 0.80
set_wait_requiredMethod · 0.80
LOGClass · 0.50

Tested by

no test coverage detected