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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:23:53+00:00 2026-05-22T12:23:53+00:00

I am testing a website that has an account page that displays a table

  • 0

I am testing a website that has an “account” page that displays a table of available subscription levels, where the column headings are the different kinds of accounts, and the rows list all features, and which are available at what level. E.g.:

          fanboy       poweruser     neophyte     freeloader
Widgets   1,000        500           250          100
Doodads     750        350           100          100
Thingies    500        250           100           50
          [UPGRADE]    [UPGRADE]     [UPGRADE]    Your Plan  

This is all done as nested div elements with unique classnames, so finding specific cells by their corresponding classnames is a snap. E.g.:

var yourPlan = driver.FindElement(By.ClassName("your_plan"));  

I can also find specific cells by their XPath, if I already know it. E.g.:

var yourPlan = driver.FindElement(By.XPath(".//div[@class='your_plan']"));  

But there are times when I need to discover the xpath of the cell I've come to by way of classname, and there doesn't seem to be an easy way to do this in Webdriver (C#). Has anyone done this before?


EDIT: Apologies to all, for not being clearer about this: I'm not having any trouble finding an element by classname or other attribute (or even xpath, when I know it already). But what I need, is a way for webdriver to report the full xpath of what it found to me, once it's found said element via a means other than xpath.

Hope that helps.

Any help appreciated.
Thanks
Greg

  • 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-22T12:23:54+00:00Added an answer on May 22, 2026 at 12:23 pm

    There’s not really any way for Selenium to give you this information. While there are some tools that will generate the XPath for a given element (the Firebug and XPather plug-ins for Firefox come to mind), this is not a feature that Selenium provides. I wish I had a better answer for you, but the answer is no, Selenium won’t provide you with the XPath to an element that you’ve found via some other means.

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

Sidebar

Related Questions

I'm working on Paypal integration in my website, following Paypal's API specifications. I'm testing
I'm using Codeigniter if this makes it easier. I'm wondering if a website is
My team has a web site with a RESTful API. We're is working on
I am trying to add my iPod Touch to devices that I may use
I'm testing the communication of my Adobe Flash app to the server using HTTPS
I have an application that is finished except for the problem i am trying
I am creating a PHP website, and need to integrate MONEYBOOKERs as the payment
I am getting Index was out of range. Must be non-negative and less than
So the typical CSRF protection method is storing a nonce in a session and
The following exception is being thrown after an IgnoreRoute method call: The controller for

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.