Using xdotool to Fuzz Website Input

September 28, 2018


I've found xdotool to be useful for testing website forms.

Here is an example where I am testing an input range and also clicking on some submit buttons.

#!/bin/bash
for i in {0..9999}

do
    sleep 2
    xdotool mousemove --sync 41 651
    xdotool click 1
    xdotool type username 
    xdotool mousemove --sync 190 673
    xdotool click 1
    sleep 2
    xdotool mousemove --sync 85 321
    xdotool click 1
    xdotool type $i
    xdotool mousemove --sync 43 350
    xdotool click 1
    sleep 2
    xdotool mousemove --sync 81 349
    xdotool click 1
done
This can of course be modified to whatever you are testing.

Comments

©2013-2023 All Rights Reserved.