我可以从linux控制台强制执行firefox页面刷新

Ken*_*Ken 12 linux firefox console-application

这是这个问题的Linux版本.有没有人有一个方法从命令行强制在Firefox上刷新页面?

gee*_*ekQ 8

您可以使用xdotool进行自动化.在Ubuntu上安装

sudo aptitude install xdotool
Run Code Online (Sandbox Code Playgroud)

然后,您可以搜索窗口并发送键或鼠标事件,请参阅man xdotool完整文档.我在开发期间在Ubuntu 10.04 LTS上使用以下脚本:

WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool windowactivate $WID
xdotool key F5
Run Code Online (Sandbox Code Playgroud)

另请参阅xdotool项目站点我的完整博客文章.