controlling HTML radio buttons with curl (bash script)
up vote
0
down vote
favorite
I'm tring to make this basic bash script which clicks radio buttons from a web page. I have seen many other related questions but none of them is exactly the same.
Here is the radio button code from the page.
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT1" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT1" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >1
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT2" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT2" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio">2
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" name="vars_scu_nplus1_sysctrl_B_ANTENNA" checked="checked" value="ANT3" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >3
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:DMLD" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="DMLD" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border: 0px none;" type="radio" >DLoad
How can I set the checked="checked" to id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" ?
curl -d "something here" pageurl
EDIT:
This is what happens if I go and click the ANT3 radio button manually.
q={"version": 1, "data": {"state": 200, "value":[{"ident": "vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null", "add": "ANT3", "value": "ANT3"}]}}&i=frontpanel&l=en_GB
I have encoded this into :
q%3D%7B%22version%22%3A%201%2C%20%22data%22%3A%20%7B%22state%22%3A%20200%2C%20%22value%22%3A%5B%7B%22ident%22%3A%20%22vars_scu_nplus1_sysctrl_B_ANTENNA%3A0%3ARBOX%3Anull%3Anull%22%2C%20%22add%22%3A%20%22ANT3%22%2C%20%22value%22%3A%20%22ANT3%22%7D%5D%7D%7D%26i%3Dfrontpanel%26l%3Den_GB
..and I added this to right url but instead of getting response:
{"version":3,"data":{"state":200,"value":[{"ident":"vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null","value":"ANT3","add":"ANT3"}]}}
.. I get only:
{"version":3,"data":{"state":200,"value":}}
The Value is missing which states the change Im trying to do here.
Should I do something to these?:
onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);"
What I have also tried:
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="1" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="ANT3" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="checked" http://"$SERVER"/"$URL" -o ./output.txt
None of these works. The radio button never gets "clicked". Output.txt is always the same where the radio button DMLD is always checked.
Any help ?
html bash shell curl radio-button
add a comment |
up vote
0
down vote
favorite
I'm tring to make this basic bash script which clicks radio buttons from a web page. I have seen many other related questions but none of them is exactly the same.
Here is the radio button code from the page.
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT1" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT1" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >1
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT2" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT2" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio">2
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" name="vars_scu_nplus1_sysctrl_B_ANTENNA" checked="checked" value="ANT3" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >3
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:DMLD" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="DMLD" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border: 0px none;" type="radio" >DLoad
How can I set the checked="checked" to id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" ?
curl -d "something here" pageurl
EDIT:
This is what happens if I go and click the ANT3 radio button manually.
q={"version": 1, "data": {"state": 200, "value":[{"ident": "vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null", "add": "ANT3", "value": "ANT3"}]}}&i=frontpanel&l=en_GB
I have encoded this into :
q%3D%7B%22version%22%3A%201%2C%20%22data%22%3A%20%7B%22state%22%3A%20200%2C%20%22value%22%3A%5B%7B%22ident%22%3A%20%22vars_scu_nplus1_sysctrl_B_ANTENNA%3A0%3ARBOX%3Anull%3Anull%22%2C%20%22add%22%3A%20%22ANT3%22%2C%20%22value%22%3A%20%22ANT3%22%7D%5D%7D%7D%26i%3Dfrontpanel%26l%3Den_GB
..and I added this to right url but instead of getting response:
{"version":3,"data":{"state":200,"value":[{"ident":"vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null","value":"ANT3","add":"ANT3"}]}}
.. I get only:
{"version":3,"data":{"state":200,"value":}}
The Value is missing which states the change Im trying to do here.
Should I do something to these?:
onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);"
What I have also tried:
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="1" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="ANT3" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="checked" http://"$SERVER"/"$URL" -o ./output.txt
None of these works. The radio button never gets "clicked". Output.txt is always the same where the radio button DMLD is always checked.
Any help ?
html bash shell curl radio-button
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm tring to make this basic bash script which clicks radio buttons from a web page. I have seen many other related questions but none of them is exactly the same.
Here is the radio button code from the page.
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT1" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT1" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >1
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT2" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT2" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio">2
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" name="vars_scu_nplus1_sysctrl_B_ANTENNA" checked="checked" value="ANT3" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >3
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:DMLD" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="DMLD" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border: 0px none;" type="radio" >DLoad
How can I set the checked="checked" to id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" ?
curl -d "something here" pageurl
EDIT:
This is what happens if I go and click the ANT3 radio button manually.
q={"version": 1, "data": {"state": 200, "value":[{"ident": "vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null", "add": "ANT3", "value": "ANT3"}]}}&i=frontpanel&l=en_GB
I have encoded this into :
q%3D%7B%22version%22%3A%201%2C%20%22data%22%3A%20%7B%22state%22%3A%20200%2C%20%22value%22%3A%5B%7B%22ident%22%3A%20%22vars_scu_nplus1_sysctrl_B_ANTENNA%3A0%3ARBOX%3Anull%3Anull%22%2C%20%22add%22%3A%20%22ANT3%22%2C%20%22value%22%3A%20%22ANT3%22%7D%5D%7D%7D%26i%3Dfrontpanel%26l%3Den_GB
..and I added this to right url but instead of getting response:
{"version":3,"data":{"state":200,"value":[{"ident":"vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null","value":"ANT3","add":"ANT3"}]}}
.. I get only:
{"version":3,"data":{"state":200,"value":}}
The Value is missing which states the change Im trying to do here.
Should I do something to these?:
onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);"
What I have also tried:
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="1" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="ANT3" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="checked" http://"$SERVER"/"$URL" -o ./output.txt
None of these works. The radio button never gets "clicked". Output.txt is always the same where the radio button DMLD is always checked.
Any help ?
html bash shell curl radio-button
I'm tring to make this basic bash script which clicks radio buttons from a web page. I have seen many other related questions but none of them is exactly the same.
Here is the radio button code from the page.
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT1" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT1" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >1
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT2" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="ANT2" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio">2
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" name="vars_scu_nplus1_sysctrl_B_ANTENNA" checked="checked" value="ANT3" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border:0" type="radio" >3
< input id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:DMLD" name="vars_scu_nplus1_sysctrl_B_ANTENNA" value="DMLD" onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);" onblur="dataTransporter.unlockField(this);" style="border: 0px none;" type="radio" >DLoad
How can I set the checked="checked" to id="vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3" ?
curl -d "something here" pageurl
EDIT:
This is what happens if I go and click the ANT3 radio button manually.
q={"version": 1, "data": {"state": 200, "value":[{"ident": "vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null", "add": "ANT3", "value": "ANT3"}]}}&i=frontpanel&l=en_GB
I have encoded this into :
q%3D%7B%22version%22%3A%201%2C%20%22data%22%3A%20%7B%22state%22%3A%20200%2C%20%22value%22%3A%5B%7B%22ident%22%3A%20%22vars_scu_nplus1_sysctrl_B_ANTENNA%3A0%3ARBOX%3Anull%3Anull%22%2C%20%22add%22%3A%20%22ANT3%22%2C%20%22value%22%3A%20%22ANT3%22%7D%5D%7D%7D%26i%3Dfrontpanel%26l%3Den_GB
..and I added this to right url but instead of getting response:
{"version":3,"data":{"state":200,"value":[{"ident":"vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null","value":"ANT3","add":"ANT3"}]}}
.. I get only:
{"version":3,"data":{"state":200,"value":}}
The Value is missing which states the change Im trying to do here.
Should I do something to these?:
onclick="dataTransporter.save(this);" onfocus="dataTransporter.lockField(this);"
What I have also tried:
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="1" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="ANT3" http://"$SERVER"/"$URL" -o ./output.txt
curl -L -b ./cookie.txt -d vars_scu_nplus1_sysctrl_B_ANTENNA:0:RBOX:null:null:ANT3="checked" http://"$SERVER"/"$URL" -o ./output.txt
None of these works. The radio button never gets "clicked". Output.txt is always the same where the radio button DMLD is always checked.
Any help ?
html bash shell curl radio-button
html bash shell curl radio-button
edited Nov 22 at 13:48
Community♦
11
11
asked Nov 22 at 7:53
user3647376
2918
2918
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426179%2fcontrolling-html-radio-buttons-with-curl-bash-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426179%2fcontrolling-html-radio-buttons-with-curl-bash-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown