【问题标题】:Focus chrome window in linux when running using xvfb使用 xvfb 运行时在 linux 中聚焦 chrome 窗口
【发布时间】:2015-02-24 09:57:35
【问题描述】:

我正在使用以下 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。

【问题讨论】:

    标签: xvfb xdotool


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-05
      • 1970-01-01
      • 2014-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多