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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:52:47+00:00 2026-05-29T22:52:47+00:00

I´m trying to get the values of TDs inside a table using WatiN. The

  • 0

I´m trying to get the values of TDs inside a table using WatiN. The problem is that I´m not able to select a table by Id (because it´s missing). Can I select it based on class?

<TABLE WIDTH="100%" CELLSPACING=0 CELLPADDING=5 BORDER=0 class="TABLEBORDER">
<TR>

<TH class=HEADTEXT>
Target
</TH>
<TH class=HEADTEXT>
Trigger<br>enabled?
</TH>
<TH class=HEADTEXT>
Account
</TH>
<TH class=HEADTEXT>
Password<br>changed?

</TH>
<TH class=HEADTEXT>
Error message<br>(if any)
</TH>
<!-- S_STATUS_ROW -->

<TR>

<TD valign=top class=CELLTEXT>
RACF
</TD>
<TD valign=top class=CELLTEXT>
No
</TD>
<TD valign=top class=CELLTEXT>
USERNAME1
</TD>
<TD valign=top class=CELLTEXT>
Yes
</TD>
<TD valign=top class=CELLTEXT>
&nbsp;

</TD>
<!-- S_STATUS_ROW -->

<TR>

<TD valign=top class=CELLTEXT>
Domain Name
</TD>
<TD valign=top class=CELLTEXT>
No
</TD>
<TD valign=top class=CELLTEXT>
FirstName.LastName
</TD>
<TD valign=top class=CELLTEXT>
Yes
</TD>
<TD valign=top class=CELLTEXT>
&nbsp;

</TD>
<!-- S_STATUS_ROW -->

<TR>

<TD valign=top class=CELLTEXT>
NotesWeb
</TD>
<TD valign=top class=CELLTEXT>
No
</TD>
<TD valign=top class=CELLTEXT>
USERNAME1
</TD>
<TD valign=top class=CELLTEXT>
Yes
</TD>
<TD valign=top class=CELLTEXT>
&nbsp;

</TD>
<!-- S_STATUS_CONTENT_BOTTOM -->
</TABLE>

There are other tables in the page. The one that I am interested is the only one that is formatted like above and I am only interested in the 3rd Column (where it says YES.. if there is a problem then it will say NO).

The table above is the only one with the class=TABLEBORDER
how can I access the 3rd column of every table row?

  • 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-29T22:52:48+00:00Added an answer on May 29, 2026 at 10:52 pm

    To identify the table, use Find.ByClass()

    There are a number of ways to get the values of a particular column, but for simplicity’s sake I tend to just iterate through the table rows; easy to understand now and 6 months from now when you come back to the code.

    Code: Print to the console the content of the 4th column (the Yes values in the HTML above), the loop starts at 1, not 0, so the first row is ignored as TH elements are not seen as table cells.

    IE browser = new IE();
    browser.GoTo("[yourURL]");
    
    Table theTable = browser.Table(Find.ByClass("TABLEBORDER"));
    
    for (int i = 1; i < theTable.OwnTableRows.Count; i++)
    {
        Console.WriteLine("column value:" + theTable.OwnTableRows[i].TableCells[3].Text);
    }
    

    The above has been tested on WatiN2.1, IE9, Win7

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

Sidebar

Related Questions

I am trying to get values from a table that lives inside an iframe
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
I am trying to get a list of values within a div that I
I'm trying to get a query working that takes the values (sometimes just the
I am trying to get the values from my select list on a jquery
Here am trying to get values from a mysql table with the name lead.
I am trying to get unique values from a table in oracle via sql.
I'm trying to get values that equal both b.business_id = 22 and l.zip =
I'm trying to get values from a JSP using getParameter which includes ü,é,à etc.
Im trying to get values from a ListBox that has multiselection and dynamic ListItems

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.