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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:20:12+00:00 2026-05-26T19:20:12+00:00

I need to find an element in selenium 2 and I know that the

  • 0

I need to find an element in selenium 2 and I know that the link i’m looking for contains some defined text that I got in a varible. So this is how the link is:

<a id="ctl00_content_list_gvOtherSchemas_ctl02_lbViewSchema"
  href="javascript:WebForm_DoPostBackWithOptions(new
   WebForm_PostBackOptions(&quot;ctl00$content$list$gvOtherSchemas$ctl02
     $lbViewSchema&quot;, &quot;&quot;, false, &quot;&quot;,
     &quot;https://test/page.aspx?_InfoPath_Sentinel=1&amp;
   case=2011-015196&amp;name=MyCase&amp;version=2&amp;p=PPC1&amp;cc=ANSOEG&amp;
   py=2011&amp;rn=CR274&amp;c=0&amp;st=DRAFT&amp;oo=1&amp;sc=SC001&amp;hln=&amp;
   tl=31-12-2011 23:59:59&amp;sa=&amp;sai=&amp;san=&quot;, false, true))"
>MyCase</a>

And I want to look for the text: “case=2011-015196” by an xpath expression.

  • 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-26T19:20:13+00:00Added an answer on May 26, 2026 at 7:20 pm

    A more specific expression that looks for the a element whose href attribute contains the target string:

    //a[contains(@href, '2011-015196')]
    

    Or, more specifically:

    //a[contains(@href, 'case=2011-015196')]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In selenium IDE, I need to find the 3rd link whose text is 'XXX'
Let's say i need to find all .bar elements inside an element that's assigned
Hey, i've parsed html doc. need to find all element that has a specified
I need to find out the pixel position of one element in a list
I need to find/create an application that will create employee web usage reports from
I need to find occurrences of ~ 25 000 words within a text. What
I need to find and replace an element in an array. Is there any
The page I'm looking at contains : <div id='1'> <p> text 1 <h1> text
I need to find an element position in an std::vector to use it for
var links = document.evaluate(//BODY/CENTER[1]/P[1]/TABLE[1]/TBODY[1]/TR[1], document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null).evaluate(//A); basically I need to find an element

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.