We need a script which will automate web browsing in Firefox to test some of our websites.
It needs to access particular websites and do certain actions including mouse movements and clicks.
The solution should run multiple browser instances individually and control their resolutions and mouse movements.
There are other variables including useragent, timezone, traffic source which also need to be implemented.
SPECIFICS OF SOLUTION REQUIRED:
We will run a VPS with 10 cores and 32gb ram.
On the VPS, we will run a number of vms.
Each vm should run the following script, in a Linux/ubuntu environment.
The script should open a new firefox browser instance.
1. The new instance has an individual useragent, resolution, timezone, fonts, cookies, etc.
2. The browser visits specific websites, and
3. On those websites, it simulates browsing by doing various mouse movements.
There should be a number of variables selected by the script including useragent, resolution, fonts, cookies, traffic source, timezone, website, mouse movements and clicks, pauses, links followed. A list will be provided - there will be approximately 10 variables.
There should be a separate batch of choices for each variable, and the script will select the variable from that batch file. Some selections will be random, some will be and some based on a statistical percentage, (eg. 30% chance of selecting A, 15% chance of selecting B, 4% chance of selecting C, etc).
The variable selections will differ depending on what piece of information is being used. Each variable should have a set of percentages or randomness which defines how the selection is made from the batch. Ideally this would be in the form of another batch file with a GUI allowing each variable's randomness/percentages to be varied.
The browser should start by browsing to a website selected from batch 1. It should pause, and then browse to a website from batch 2 (the test group, which are websites we will acquire or develop).
Here, it should do the simulated browsing as described below.
Next, it should select to either click a link on the page and simulate browsing at the linked page, close, or bounce to a website selected from batch 3.
Finally, it should pause, then close the browser, and return to the beginning of the script to start again.
3. SIMULATED BROWSING:
The mouse movements should be random, but reflect a real user. As a method, we thought of using Autohotkey to record two groups of macros capturing mouse movement:
Group X: 30 individual 5 second macros
Group Y: 20 individual 15 second macros
Then, selecting a random sequence of multiple X and Y macros, varying their speeds, and adding some random scrolls, short pauses and mouseclicks between some of them. Each macro would begin relative to where the last one ended.
We don't mind what method is used for simulating mouse movement, as long as the result is similar to above. But we want to set a range of minimum and maximum browsing times per page, and a median or average time to spend per page. In the mouse movement method described above, that range would govern the number of X and Y sequences selected.
Thanks for reading.