Good day, such a question does not always work click inside the browser how can I fix it?
if more precisely on certain parts of the screen, for example, click on edit on the site but it does not click, but for example clicks on
procedure TForm1.Simulate_Mouse_Click(X, Y: string);
var
MouseEvent : TCefMouseEvent;
KeyEvent : TCefKeyEvent;
begin
MouseEvent.x := strtoint(X);
MouseEvent.y := strtoint(Y);
Chromium1.Browser.Host.SendFocusEvent(true);
Chromium1.Browser.Host.SendMouseClickEvent(PCefMouseEvent(@MouseEvent), MBT_LEFT, false, 1);
Chromium1.Browser.Host.SendMouseClickEvent(PCefMouseEvent(@MouseEvent), MBT_LEFT, true, 1);
end;
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Click
- salvadordf
- Posts: 4571
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Click
Perhaps those functions can't be called so fast. Try adding a delay between the 2 SendMouseClickEvent calls to simulate a real click.
-
- Posts: 44
- Joined: Sun Jul 07, 2019 1:46 pm
Re: Click
This method does not work with clicking "I'm Feeling Lucky" button at Google.com
Does anybody has a suggestion to do it with SendMouseClickEvent?
Does anybody has a suggestion to do it with SendMouseClickEvent?