我目前正在尝试编写一个脚本来通过 shell 脚本更改网页上的一些参数。我可以毫无问题地更改文本框中的值,但我似乎无法弄清楚如何“按下”应用按钮。
这就是我更改值的方式,如您所见,我需要最后一次“应用”按钮。
setJitterDelay()
{
rate=${1}
if [ "${rate}" == "low" ]; then
((htmlJitterNegDelta = 5))
((htmlJitterPosDelta = 5))
((htmlJitterDelayMax = 10))
jDelta=5
else
if [ "${rate}" == "med" ]; then
((htmlJitterNegDelta = 25))
((htmlJitterPosDelta = 25))
((htmlJitterDelayMax = 50))
jDelta=25
else
if [ "${rate}" == "high" ]; then
((htmlJitterNegDelta = 50))
((htmlJitterPosDelta = 50))
((htmlJitterDelayMax = 100))
jDelta=50
else
echo "error: low, med, high not selected! Skipped..."
return
fi
fi
fi
### APPLY BUTTON
}
Run Code Online (Sandbox Code Playgroud)
我使用 Firebug 来了解我必须更改哪些值,Apply …