| ZennoLab.Emulation Assembly > ZennoLab.Emulation Namespace > Emulator Class > MouseClick Method : MouseClick(Int32,MouseButton,MouseButtonEvent,Int32,Int32) Method |
Type: System.Int32
The handle of the window.
Type: System.Int32
The x coordinate relative to the window.
Type: System.Int32
The y coordinate relative to the window.
public static string MouseClick( int handle, MouseButton button, MouseButtonEvent buttonEvent, int x, int y )
Type: System.Int32
The handle of the window.
Type: ZennoLab.Emulation.MouseButton
The mouse button for emulation.
Type: ZennoLab.Emulation.MouseButtonEvent
The event of mouse button for emulation.
Type: System.Int32
The x coordinate relative to the window.
Type: System.Int32
The y coordinate relative to the window.
Type: System.String
The answer with information about the success of the current command's execution. If current command was successful then this answer is "ok"; otherwise message describing the error.
// find the html element HtmlElement he = instance.ActiveTab.FindElementByTag("input:submit", 0); // check the element if (!he.IsVoid) { // click string result = Emulator.MouseClick(instance.ActiveTab.Handle, MouseButton.Left, MouseButtonEvent.Click, he.DisplacementInTabWindow.X + 10, he.DisplacementInTabWindow.Y + 10); // click was performed if (result == "ok") return "All done"; // fail return "Fail"; } // element not found return "Element not found";
// find the html element $he = $instance->ActiveTab->FindElementByTag("input:submit", 0); // check the element if (!$he->IsVoid) { // click $result = ZennoLab\Emulation\Emulator::MouseClick($instance->ActiveTab->Handle, ZennoLab\Emulation\MouseButton::Left, MouseButtonEvent::Click, $he->DisplacementInTabWindow->X + 10, $he->DisplacementInTabWindow->Y + 10); // click was performed if ($result == "ok") return "All done"; // fail return "Fail"; } // element not found return "Element not found";
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.