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 8952017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:46:45+00:00 2026-06-15T13:46:45+00:00

I have text that says ‘Roles’. After that there are two checkboxes. I can

  • 0

I have text that says ‘Roles’. After that there are two checkboxes.
I can get to ‘Roles’.
How can I get to and click check the checkboxes?

I am trying to use:

xpath=(//label[contains(text(),'Roles')]/div/span/input)

but getting not found.

My HTML is:

<div class="control-group string required">
  <label class="string required control-label" for="survey_name">
  <abbr title="required">*</abbr> Name</label>
  <div class="controls">
    <input class="string required" id="survey_name" name="survey[name]" size="50" type="text" /></div>
  </div>
  <div class="control-group check_boxes required">
    <label class="check_boxes required control-label">
      <abbr title="required">*</abbr> Roles
    </label>
    <div class="controls">
      <span class="checkbox">
        <input class="check_boxes required" id="survey_role_ids_121" name="survey[role_ids][]" type="checkbox" value="121" />
      </span>
    </div>
  </div>
</div>
  • 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-15T13:46:47+00:00Added an answer on June 15, 2026 at 1:46 pm

    The div is not a child of the label, is is a following-sibling. Therefore, the XPath expression you need is

    //label[contains(., "Roles")]/following-sibling::div/span/input
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

as the title says, is there a way I can have a clock that
Suppose I have a text file that says: This file has plain text Now,
I have some text in my application that says in case you need extra
I have a button with text that says Music On/Off. With the following Console.Beep()
In my android app I have a text field that says how much would
the empty selector says that: Matches all elements that have no children (including text
I want to have a text box that the user can type in that
I have to insert into a comment column in oracle with text that says
I have text that looks like: My name is (Richard) and I cannot do
I have text that starts with (parag1 level=All) as start tag and end with

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.