GTR
Well-Known Member
- Joined
- Feb 10, 2016
- Messages
- 10,278
- Reaction score
- 22,985
- Points
- 1,313
- Gender
- Male
we need the music for this "YEAHHHHHHHHHHHHHHHHHHHHHH!"Let's just say it's a very...
...concise script.
we need the music for this "YEAHHHHHHHHHHHHHHHHHHHHHH!"Let's just say it's a very...
...concise script.
nice work
you helped me as i did not feel like making one tonight
So is the idea with the lineYou can accomplish it with just:
$('input[value="Yes"]').click(); [This hits all 3]
$('input[value="NoBlurry"]').click();
If you're using a jquery selector and you don't specify an object, it will perform the action for all objects that match that selector, in this case, all inputs with a value of Yes.So is the idea with the line
$('input[value="Yes"]').click();
that it will hit as many "yes" radio buttons as a hit has, and will only hit "no" on whatever you've specified to do so?
document.querySelectorAll("input[type='radio']")[0].click();
Correct. In this context that's how that single line works because all of the values in these Validation HITs are the same. If I wanted them all to be marked 'no' then the value would be $('input[value="No"]').click(); but this would still not work on the Blurry radio button because the 3 options have more specific values (e.g. "YesWhole", "YesEdges","NoBlurry" the first 2 are misnomers) so that's why there has to be the second line.So is the idea with the line
$('input[value="Yes"]').click();
that it will hit as many "yes" radio buttons as a hit has, and will only hit "no" on whatever you've specified to do so?
Thank you!If you're using a jquery selector and you don't specify an object, it will perform the action for all objects that match that selector, in this case, all inputs with a value of Yes.
I usually just use query selector for radios, because it doesn't require inspecting anything. You can just use it for any radio button. In plain js:
^clicks the first radio button on a page.Code:document.querySelectorAll("input[type='radio']")[0].click();
Ah, I will explore this more tomorrow! Thanks for your help this evening!Correct. In this context that's how that single line works because all of the values in these Validation HITs are the same. If I wanted them all to be marked 'no' then the value would be $('input[value="No"]').click(); but this would still not work on the Blurry radio button because the 3 options have more specific values (e.g. "YesWhole", "YesEdges","NoBlurry" the first 2 are misnomers) so that's why there has to be the second line.
Most other A9s have values that are specific values, so simply using Yes/No won't work. You have to right-click within the HIT window, select Frame Source, and then find the specific value descriptor... It's easiest to then just type Control+F and then search for the term value= and you can figure out all of the possibilities, then pick the ones that are most appropriate for 99% of that specific A9 HIT type.