I am making a WebAutomation tool,I would like to know how I could send mouse events to the WebEngineView. Here are some things I have tried but haven't work.
event= createMouseEvent(QEvent::MouseButtonPress, QPoint(mouse_x,mouse_y), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
QApplication::instance()->sendEvent(view,event);
and
QTestEventList eventos;
eventos.addMouseClick(Qt::LeftButton, 0, QPoint(mouse_x,mouse_y), -1);
eventos.simulate(view);
where view is a QWebEngineView. I know that one can use javascript methods for clicking .But i would like to provide the user with a method of using mouse coordinates instead.
I would prefer a solution that is cross platform (I am also working on a linux version of the program) and can work when the window is minimised or not in view.
A noob friendly explanation will be greatly apprecieated. Please help. Thanks in advance.