···
ffmpeg # fake webcam stream
204
-
gnome-text-editor # somewhere to paste QR result
204
+
xclip # inspect QR contents copied into clipboard
xdotool # clicking on QR button
···
machine.wait_for_text("${feedLabel}")
machine.succeed("xdotool mousemove 510 670 click 1") # open up QR decode result
249
-
# OCR is struggling to recognise the text. Click the clipboard button and paste the result somewhere else
249
+
# OCR is struggling to recognise the text. Click the clipboard button, check what got copied
machine.screenshot("lomiri-barcode_decode")
machine.succeed("xdotool mousemove 540 590 click 1")
255
-
# Need to make a new window without closing camera app, otherwise clipboard content gets lost?
256
-
machine.send_key("ctrl-alt-right")
257
-
machine.succeed("gnome-text-editor >&2 &")
259
-
machine.send_key("alt-f10")
261
-
machine.wait_for_text("New")
263
-
# Font size up to help with OCR
264
-
machine.send_key("ctrl-kp_add")
265
-
machine.send_key("ctrl-kp_add")
266
-
machine.send_key("ctrl-kp_add")
267
-
machine.send_key("ctrl-kp_add")
268
-
machine.send_key("ctrl-kp_add")
269
-
machine.send_key("ctrl-kp_add")
270
-
machine.send_key("ctrl-kp_add")
271
-
machine.send_key("ctrl-kp_add")
272
-
machine.send_key("ctrl-kp_add")
273
-
machine.send_key("ctrl-kp_add")
274
-
machine.send_key("ctrl-kp_add")
275
-
machine.send_key("ctrl-kp_add")
276
-
machine.send_key("ctrl-kp_add")
277
-
machine.send_key("ctrl-kp_add")
278
-
machine.send_key("ctrl-kp_add")
279
-
machine.send_key("ctrl-kp_add")
281
-
machine.send_key("ctrl-v")
282
-
machine.wait_for_text("${feedQrContent}")
253
+
machine.wait_until_succeeds("env DISPLAY=:0 xclip -selection clipboard -o | grep -q '${feedQrContent}'")