Skip to content

Commit 05da83d

Browse files
committed
Adding log when hook procedure can't be installed
1 parent fd57d5b commit 05da83d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: cpp/webdriver-interactions/interactions.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,11 @@ static HKL attachInputToIEThread(HWND directInputTo)
358358
hook = SetWindowsHookEx(WH_GETMESSAGE, (HOOKPROC) &GetMessageProc,
359359
moduleHandle, ieWinThreadId);
360360

361-
// Attach to the IE thread so we can send keys to it.
361+
if (hook == NULL) {
362+
LOGERR(WARN) << "Unable to set Windows hook. Individual keystrokes will be very slow";
363+
}
364+
365+
// Attach to the IE thread so we can send keys to it.
362366
if (ieWinThreadId != currThreadId) {
363367
AttachThreadInput(currThreadId, ieWinThreadId, true);
364368
}

0 commit comments

Comments
 (0)