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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:14:49+00:00 2026-06-06T04:14:49+00:00

We are just learning Java/Selenium as our QA is moving towards automation. I am

  • 0

We are just learning Java/Selenium as our QA is moving towards automation. I am using Selenium 2 WebDriver for automation. There are some fields on a form that are multiple-select, auto-complete fields. Basically, you can type the beginning of something and the field will provide options that match, which you select and it gets added to the field. You can add as many items as you want (basically the same thing as the “tags” field for submitting this question). I am trying to delete an added item from this field, but cannot figure out the CSS path. Firebug shows the following HTML:

 <div class="c4i-fieldDiv rel" style="min-height: 36px">
 <div id="groupsDropdown" class="ui-autocomplete-multiple">
 <ul class="ui-autocomplete-multiple-container ui-widget ui-inputfield ui-state-default ui-corner-all">
<li class="ui-autocomplete-token ui-state-active ui-corner-all" data-token-value="testGroup">
<span class="ui-autocomplete-token-label">testGroup</span>
<span class="ui-autocomplete-token-icon ui-icon ui-icon-close"></span>

The code I am using is:

WebElement deleteGroup = findElementBySelector("//div[@id='groupsDropdown']/ul/li/span");    
deleteGroup.click();
  • 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-06T04:14:51+00:00Added an answer on June 6, 2026 at 4:14 am

    this code worked to delete the third item added:

    WebElement delrole3 = findElementByXpath("//div[@id='groupsDropdown']/ul/li[3]/span");
    delrole3.click();
    

    changing [3] to any other number that corresponds to an item in the field will work to delete that item.

    IDE was not registering the [#] portion for some reason.

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

Sidebar

Related Questions

I am learning Java and just found that the Interface can have fields, which
I just started learning C++ (coming from Java ) and am having some serious
I am a C programmer and just learning some java recently because I am
I just started learning Java and I encountered some problems with the tag in
I'm just learning Java, and I find that the Java docs/books put a strong
i'm just learning java, and i meet some problems. Here we have simple factory
I've just started learning Spring (and Java) and I'm putting together an application that
I have just began learning Java programming, I have created a simple game using
Total noobie question here. I'm just learning Java, and studying passing arguments to functions.
I've just started learning Java (about a week ago) and the last few days

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.