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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:23:25+00:00 2026-05-23T20:23:25+00:00

I need to verify using Selenium (or similar framework) that certain HTML content/items are

  • 0

I need to verify using Selenium (or similar framework) that certain HTML content/items are on the page using known unique identifiers.

I have control over the generation of the HTML, so I will mark the HTML tags with an attribute, but sometimes the usual candidates of id, name etc aren’t available for me to use.

Is there an industry standard for such an attribute?
If not, anyone have any good suggestions?

The attribute shouldn’t collide with any known attributes of any HTML elements or affect the web experience/behaviour (I don’t care if someone reads the HTML source and sees it).

Some ideas I have are:

  • trace
  • debug
  • uid

Here’s how I would like to use it for the example identifier “123456789”:

<a trace="123456789" href="http://www.someurl.com">Click me!</a>
<span debug="123456789">Hello world</span>
<strong uid="123456789">Wow</strong>
  • 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-23T20:23:26+00:00Added an answer on May 23, 2026 at 8:23 pm

    Use a HTML5 data-* attribute.

    Custom data attributes are intended to store custom data private to
    the page or application, for which there are no more appropriate
    attributes or elements.

    More information here: http://developers.whatwg.org/elements.html#embedding-custom-non-visible-data-with-the-data-*-attributes

    They won’t cause any problems in older browsers: http://caniuse.com/dataset

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

Sidebar

Related Questions

I am writing a selenium test and I need to assert that the page
I am using jquery bassistance validation and need to verify that a start date
I'm using browser automation for testing web sites but I need to verify HTTP
I'm using browser automation for testing web sites but I need to verify HTTP
I need some easy API to verify that a PE file is valid &
I am trying to load a html page through UIWebview.I need to disable all
I need to verify users in the company using only their username - not
I just need to verify that this regex statement will do what I want.
I am reading a std::istream and I need to verify without extracting characters that:
Examples: 2011-01-01 2011-01-01,2011-01-28,2011-12-31 etc. I don't need it to verify that the dates themselves

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.