Note that there are some explanatory texts on larger screens.

plurals
  1. POSelenium radio buttons trouble clicking
    primarykey
    data
    text
    <p>I am having MUCH trouble with selenium, as I don't even understand how the xpath works. I'm trying to make a script which selects a random radio button out of the available buttons. Heres the source code for the part of the page i'm interested in:</p> <pre><code>&lt;input class="answerListOption hideOther answerCommentRequired answerCommentRequired190620_0" type="radio" name="survey_answer[190620][]" value="686346" data-mustcomment="answerCommentRequired190620" /&gt; &lt;span class="answerText"&gt;xBox&lt;/span&gt; &lt;/label&gt; &lt;/li&gt; &lt;li class="answerRowBox_4"&gt; &lt;label&gt; &lt;input class="answerListOptions answerlistradio" type="radio" name="survey_answer[190620][]" value="-3117" tabindex="-1"/&gt; &lt;span class="answerText"&gt;n/a&lt;/span&gt; &lt;/label&gt; &lt;/li&gt; &lt;li class="e848aca52a896563b17cd1484b2e3805"&gt; &lt;label&gt; &lt;input class="answerListOption hideOther answerCommentRequired answerCommentRequired190620_0" type="radio" name="survey_answer[190620][]" value="686347" data-mustcomment="answerCommentRequired190620" /&gt; &lt;span class="answerText"&gt;PS4&lt;/span&gt; &lt;/label&gt; &lt;/li&gt; &lt;li class="bae58c269d9264734bf527ceb86bcb86"&gt; &lt;label&gt; &lt;input class="answerListOption hideOther answerCommentRequired answerCommentRequired190620_0" type="radio" name="survey_answer[190620][]" value="686348" data-mustcomment="answerCommentRequired190620" /&gt; &lt;span class="answerText"&gt;N/A&lt;/span&gt; &lt;/label&gt; &lt;/li&gt; &lt;li class="answerRowBox_4"&gt; &lt;input type="text" name="survey_answer[190620][-5630]" class="inputText charCounter" maxlength="150" data-maxlength="150" name="Input3" value="" tabindex="-1" /&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Its a few different radio buttons, with different awnsers. One is for xbox, other is for ps3. How would I select one of these radio buttons?</p> <p>I'm trying to select one of them by the name "survey_awnser" as its the only thing that doesn't change.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload