It's difficult to automate browsers from the outside, and this is on purpose for security reasons. You could automate within a browser, but still it's clunky for what you're trying to do, which should be straightforward.
The number of steps it takes to get to the tools in GEDMatch has been bugging me, along with the way each page checks the referer header, which often gets you lost when you're trying to work in multiple tabs.
The script below goes through steps that GEDMatch likes to see in order, then gets your comparison.
If you install cygwin (https://cygwin.com/install.html) and then in cygwin install the cURL package (http://stackoverflow.com/questions/3647569/how-do-i-install-curl-on-cygwin), then the shell script below should do what you want without using any browsers.
Save it as an executable .sh file where your cygwin environment can access it.
(assuming if you've modified the script to use your credentials)... it will save the results of the kit comparison to myFile.html, and will open myFile.html in your default browser.
Long story short: the script below is a bash script to do a one-to-one compare on GEDMatch, save the file locally, then open the file in your default browser. It should work out-of-the-box in MacOS or Linux, but on Windows, you need cygwin and curl to do it.
Save it as "one2one.sh" or whatever, make it executable, then call it from the cygwin prompt like
$ ./one2one.sh f123456 f654321 ./myFile.html
#!/bin/bash
uname="youremail@example.com" #replace me
pword="yourpassword" #replace me
#alternative is 0 if you don't want the charts
chart=1
resolution=1000
threshold=500
shared=6
win_size=51
bunch_limit=25
credentials="email=$uname&password=$pword"
initialPage="http://v2.gedmatch.com/login1.php"
loginPage="http://v2.gedmatch.com/login2.php"
selectPage="http://v2.gedmatch.com/select.php"
compare1Page="http://v2.gedmatch.com/u_compare1.php"
compare2Page="http://v2.gedmatch.com/cgi-bin/u_compare2.cgi?kit1=$1&kit2=$2&chart=$chart&resolution=$resolution&threshold=$threshold&shared=$shared&win_size=$win_size&bunch_limit=$bunch_limit&xsubmit=Submit"
# these requests go through a sequence that logs you in and then travels
# to the comparison page in a way makes GEDMatch happy
res=$(curl -i -c ./cookies.txt -s "$initialPage")
res=$(curl -i -b ./cookies.txt -s --referer "$initialPage" --data "$credentials" "$loginPage")
res=$(curl -i -b ./cookies.txt -s --referer "$loginPage" "$selectPage")
res=$(curl -i -b ./cookies.txt -s --referer "$selectPage" "$compare1Page")
res=$(curl -b ./cookies.txt -s --referer "$compare1Page" "$compare2Page")
# res now is the response from the comparison
# echo it into a file
# customize this to taste.
# replaces "base" so that the images are still loaded from the server
res=$(echo $res | sed -e 's|<head>|<head><base href="http://v2.gedmatch.com/cgi-bin/"/>|g')
echo $res > $3
# open the file with the default opener
open $3