summaryrefslogtreecommitdiff
path: root/test
blob: bac5993f72c57f5b910e9e8aff7f1a1f4e292c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh -ex

Xvfb :99 -screen 0 1280x1024x24 -nolisten tcp &
set DISPLAY=:99
sleep 5
DISPLAY=:99 WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -i
# For some reason we have to set this here, having set .. ^ is not enough
DISPLAY=:99 msiexec /i lua4win.msi &
win=$(DISPLAY=:99 xdotool search --sync --name "Installer")
WIN="Lua4Win Installer 1.0 Setup"
# Click agree to terms
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/1.png
DISPLAY=:99 xdotool mousemove --window "$win" --sync 180 285
DISPLAY=:99 xdotool sleep 0.1
DISPLAY=:99 xdotool click 1
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/2.png
# Click Install
DISPLAY=:99 xdotool mousemove --window "$win" --sync 333 333
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/3.png
DISPLAY=:99 xdotool mousemove --sync 725 666
sleep 1
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/4.png
DISPLAY=:99 xdotool click 1
sleep 1

DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/5.png
DISPLAY=:99 xdotool mousemove --sync 743 666
sleep 1
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/6.png
DISPLAY=:99 xdotool click 1
sleep 1
DISPLAY=:99 xwd -name $WIN | magick xwd:- png:/root/7.png
tar -czf images.tar.gz *.png