PDA

View Full Version : Simulating mouse clicks



bvox
13th July 2017, 13:44
Good morning.
It's been a while since I started using Qt5 and C ++ for a program that will have to run on a Linux platform. I have a problem I do not know how to solve and ask for help.
My program will only have to engage the left side of the screen, while on the right side a web page will be active to insert lottery games.
When in the left half I click on a particular button, the cursor will have to be placed on the web page and click on a particular area that serves to indicate the number to play the lot. In this way I would like to automate the insertion of some hundreds of bets that my program will produce.
I was able to move the cursor to the web page, but I can not play the mouse click on that location. Is there anyone who can help me? Many thanks.

Infinity
15th July 2017, 19:42
Since it is a web page, using Qt WebEngine or Qt WebKit would make sense. Both allow to inject JavaScript so you can manipulate the web page easily. The task also sounds like something for PhantomJS or Chromedriver.