0

我正在使用以下 shell 脚本将焦点放在特定的 chrome 窗口上:

#!/bin/sh

WIDId=`xdotool search "Test page"`
xdotool windowactivate --sync $WIDId
sleep 2
xdotool windowactivate $WIDId
xdotool key --clearmodifiers ctrl+a

它在正常运行时工作,但在使用 xvfb 运行 chrome 时失败。在 xvfb 中找不到 windowID。我需要它来使用 xvfb。

4

1 回答 1

0

即使不使用 windowactivate 它也可以工作,因为我只打开了一个需要焦点的窗口。

于 2015-03-11T09:14:39.170 回答