-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (91 loc) · 2.61 KB
/
test.yml
File metadata and controls
94 lines (91 loc) · 2.61 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# generated by o1, edited by sasa+1
name: test
on:
- push
jobs:
xdotool:
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get update
sudo apt-get install -y xdotool xvfb x11-apps imagemagick chromium
- run: |
Xvfb :99 -screen 0 1024x768x24 &
echo 'DISPLAY=:99' >> "$GITHUB_ENV"
- run: |
chromium &
sleep 5
xdotool type 'Hello, World!'
xdotool key Return
- run: |
xwd -root -display :99 -silent | convert xwd:- png:/tmp/screenshot.png
- uses: actions/upload-artifact@v4
with:
name: xdotool-screenshot1
path: /tmp/screenshot.png
xdotool-with-ime:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- run: >
sudo apt-get --yes install
xdotool
xvfb
x11-apps
imagemagick
chromium
ibus
ibus-mozc
fonts-noto-cjk
- run: |
Xvfb :99 -screen 0 1024x768x24 &
echo 'DISPLAY=:99' >> "$GITHUB_ENV"
export DISPLAY=:99
ibus-daemon -d -x
sleep 3
ibus restart
- name: Configure ibus for mozc
run: |
gsettings set org.freedesktop.ibus.general preload-engines "['xkb:jp::jpn','mozc-jp']"
gsettings set org.freedesktop.ibus.general use-system-keyboard-layout true
- run: chromium --no-sandbox "https://www.google.com" &
continue-on-error: true
- run: |
sleep 5
# ウィンドウをアクティブに
xdotool search --onlyvisible --class chromium windowactivate
sleep 1
# 日本語入力モードに切り替え
# xdotool key Hangul
xdotool key Zenkaku_Hankaku
sleep 1
# 日本語を入力
# xdotool type "こんにちは、世界"
xdotool key k
xdotool key o
xdotool key n
xdotool key n
xdotool key n
xdotool key i
xdotool key t
xdotool key i
xdotool key h
xdotool key a
xdotool key ,
xdotool key Space
xdotool key s
xdotool key e
xdotool key k
xdotool key a
xdotool key i
xdotool key Return
sleep 1
# Enterキーを押す
xdotool key Return
sleep 5
- run: |
xwd -root -display :99 -silent | convert xwd:- png:/tmp/screenshot.png
- uses: actions/upload-artifact@v4
with:
name: xdotool-screenshot2
path: /tmp/screenshot.png