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

Function mouseUpAt

cpp/webdriver-interactions/interactions.cpp:812–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

810}
811
812LRESULT mouseUpAt(WINDOW_HANDLE directInputTo, long x, long y, long button)
813{
814 if (!directInputTo) {
815 LOG(WARN) << "Window handle is invalid";
816 return ENULLPOINTER;
817 }
818
819 UINT message;
820 WPARAM wparam;
821 LRESULT returnValue;
822
823 fillEventData(button, false, &message, &wparam);
824 pausePersistentEventsFiring();
825
826 SendMessage((HWND) directInputTo, WM_MOUSEMOVE, (shiftPressed ? MK_SHIFT : 0), MAKELPARAM(x, y));
827 if (!isSameThreadAs((HWND) directInputTo)) {
828 BOOL toReturn = PostMessage((HWND) directInputTo, message, wparam, MAKELONG(x, y));
829
830 // Wait until we know that the previous message has been processed
831 SendMessage((HWND) directInputTo, WM_USER, 0, 0);
832 returnValue = toReturn ? 0 : 1; // Because 0 means success.
833 } else {
834 returnValue = SendMessage((HWND) directInputTo, message, wparam, MAKELONG(x, y));
835 }
836 // Assume it's the left mouse button.
837 if(WD_CLIENT_RIGHT_MOUSE_BUTTON != button) {
838 updateLeftMouseButtonState(false);
839 }
840 resumePersistentEventsFiring();
841
842 return returnValue;
843}
844
845LRESULT mouseMoveTo(WINDOW_HANDLE handle, long duration, long fromX, long fromY, long toX, long toY)
846{

Callers 2

clickAtFunction · 0.70
doubleClickAtFunction · 0.70

Calls 6

fillEventDataFunction · 0.85
isSameThreadAsFunction · 0.85
LOGClass · 0.70

Tested by

no test coverage detected