我正在尝试使用 来从终端的 Postman 活动选项卡中“发送请求” xdotool
。
在 Postman 中,我们可以使用ctrl+enter
组合键来“发送请求”。所以我尝试了:
xdotool search --onlyvisible --class Postman key ctrl+Return
此命令不会引发任何错误,但 Postman 没有任何反应。那么你能告诉我在当前活动的 Postman 选项卡中“发送请求”的正确命令是什么吗?
谢谢你!
编辑:我已运行命令以确保该类是 Postman。这是命令xwininfo
的结果:xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
xwininfo: Window id: 0x420000d "Postman"
Absolute upper-left X: 1
Absolute upper-left Y: 52
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 681
Height: 715
Depth: 24
Visual: 0x21
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +1+52 -684+52 -684-1 +1-1
-geometry 681x715+-10--10
命令输出xprop|grep 'CLASS\|NAME'
:
WM_NAME(UTF8_STRING) = "Postman"
_NET_WM_NAME(UTF8_STRING) = "Postman"
WM_CLASS(STRING) = "postman", "Postman"
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"