问题
Is it possible to use xdotool to enter a web console command like this command:
$("#var2").css("move", - 44 + "deg")
回答1:
Yes is possible, you can use web console or address bar. with this step:
- Focus on Browser
- press F12
- Type code
this example xdotool script using web console:
search --sync --onlyvisible --name "chrome"
windowactivate --sync
keydown F12
sleep 1
type --clearmodifiers --delay 10 --args 1 "document.getElementsByTagName('body')[0].style.backgroundColor = 'green'"
sleep 1
key Return
sleep 0.5
key F12
save script as 'xdt.txt', run it with xdotool
xdotool - < xdt.txt
来源:https://stackoverflow.com/questions/43286199/is-it-possible-to-use-xdotool-to-enter-a-web-console-command