Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8489871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:56:53+00:00 2026-06-10T21:56:53+00:00

I am using webdriver for automation and each question has some radio buttons with

  • 0

I am using webdriver for automation and each question has some radio buttons with some text like yes/no beside the radio button. following is the code I get by inspecting element

<label class="fs-508-label" for="editTemplate-editForm-content-flowTemplateFull-genericPage-_id162-page_0-profilerQuestionnaireBlock-_id167-page__1-questionnaire-_id169-0-questionRadio_com.taleo.functionalcomponent.prescreening.entity.question.PossibleAnswer__78620">   

<input name="editTemplate-editForm-content-flowTemplateFull-genericPage-_id162-page_0-profilerQuestionnaireBlock-_id167-page__1-questionnaire-_id169-0-questionRadio" id="editTemplate-editForm-content-flowTemplateFull-genericPage-_id162-page_0-profilerQuestionnaireBlock-_id167-page__1-questionnaire-_id169-0-questionRadio_com.taleo.functionalcomponent.prescreening.entity.question.PossibleAnswer__78620" value="com.taleo.functionalcomponent.prescreening.entity.question.PossibleAnswer__78620" type="radio" class="possibleanswers" onclick="onChoicePicked(this)"> 

No

</label>

can you please help me figure it out.
I am currently able to get the radio button using

element = browser.find_element_by_name(name got form above)

but element.text is not giving me ‘No’ but empty which is baffling me. I might be missing some thing here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T21:56:55+00:00Added an answer on June 10, 2026 at 9:56 pm

    Your element is empty and this is correct behaviour. The thing is, that by doing browser.find(“idblahblah”) you simply get only the radio button element itself, not the text as this is other element. The text itself is an element that can be found by doing driver.findElement(By.className(“fs-508-label”)) however this is not the best solution as class values tend to change.
    I would recommend changing the html for this a little bit to sth like this:

    <input id="true_radio_button" type="radio" name="bar"
    value="bar_radio_true" checked="checked"/> 
    <label id="whatever" for="true_radio_button">True</label>
    

    This way you can now easily find the radio button using ID and then find corresponding Label. Checking if it’s the correct one can be done by checking if the ‘for’ attribute is equal to the radio button ID – label.getAttribute(“for”) equal to radio_button_ID

    Edit:
    Using this: driver.findElement(By.className(“fs-508-label”)) should work just fine

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to set a text field with watir-webdriver using css selectors to
I am using WebDriver with Java for test automation. I have the following HTML
I am using WebDriver with java. I want to input some text in a
I'm using Selenium WebDriver, how can I check if some text exist or not
I'm using watir-webdriver to interact with radio buttons in Firefox that are styled as
I am using webdriver for test automation on site which code is auto-generated probably
I am using Selennium Webdriver to automate a click of a PDF download button.
I have some tests created using Selenium WebDriver. When I run them using IE
I'm using selenium webdriver to write tests, and the following code returns the error
I use Selenium to test some web-product in my company. Product has button, which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.