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

  • Home
  • SEARCH
  • 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 518435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:56:13+00:00 2026-05-13T07:56:13+00:00

I have the following xpath statement in a selenium test: //tbody/tr[td/span[text()=’IPODate’]]/td[4]/input It gets what

  • 0

I have the following xpath statement in a selenium test:

//tbody/tr[td/span[text()='IPODate']]/td[4]/input

It gets what I want but my tests are painfully slow in IE6. Anyone know how I would do the same selector as CSS selectors? I think I understand how to do each of these with exception to the text()=”IPODate” part.

As requested here is an example of the table I am trying to select from:

<table cellspacing="0" cellpadding="4" border="0" id="tblResearchItems" class="coolTable SingleItem">
        <tbody>

…. many many rows

<td>
    <input type="button" value="A" onclick="sA('secm.Company', 'IPODate', 299)" class="RButton NarrowButton2 A Show_N"/>
</td>
<td class="TCN">
    <span class="CN">IPODate</span><f/>
</td>
<td>
    <g/> 
</td>
<td class="TCV VerticalAlign">
    <input type="text" value="" onfocus="stLT(); hideLB(true)" onblur="mustBeDate($(this));" class="UpUI_Y  date NDD hasDatepicker" id="dp1260909771780"/>
    <img class="ui-datepicker-trigger" src="../images/calendar.gif" alt="..." title="..."/> <div/>
</td>
</tr>

…many many more rows…

in this example only one row has the IPODate cell.

  • 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-05-13T07:56:13+00:00Added an answer on May 13, 2026 at 7:56 am

    the CSS locator is css=span.CN for the span that has the text IPODate in it.

    Saucelabs have a good explanaton of how it works on their blog

    UPD:
    Unfortunately CSS won’t parse the entire tree when move up and down till it finds what it is after. This is the main reason why XPath is so slow. CSS finds an item and then can move laterally through the DOM. The CSS below will find the input box that is after the TD that has class=TCN which holds your span with text in the table.

    CSS: table > tbody > tr > td.TCN + td + td > input

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

Sidebar

Related Questions

I have the following xpath query which seems to be working but I just
I have the following XPath to match authors name in an Amazon page: //div[@class='pTitle']/span[@class='small
I have the following XPath to match attributes of the class span: //span[@class='amount'] I
I have this following line $agent->follow_link( xpath => '//a[text() = 123456]' ); I am
I have the following HTML: <div class=top> <p>Blah.</p> I want <em>this</em> text. </div> What
I have the following XPATH line: //det[@nItem=1]/prod/cProd That successfully selects the desired node using
I have the following html and like to know how to use xpath to
i have the following code to for xpath query... <div class=buying> <h1 class=parseasinTitle >
I have the following paths: /my:company/ns1:Audit/ns1:Visit/ns1:customField10 /my:company/ns1:Audit/ns1:Visit/ns1:accountNumber I want to select ns1:customField10 if it
I have the following line of xml that I'm trying transform using XSLT but

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.