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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:59:08+00:00 2026-06-15T15:59:08+00:00

I have the following html code <svg height=600 width=910 xmlns:xlink=http://www.w3.org/1999/xlink id=svgcontent overflow=visible x=910 y=600

  • 0

I have the following html code

  <svg height="600" width="910" xmlns:xlink="http://www.w3.org/1999/xlink"  
   id="svgcontent" overflow="visible" x="910" y="600" viewBox="0 0 910 600">
    <g style="pointer-events:all">
      <text fill="rgb(0,0,0)" font-family="Sans-Serif" font-size="13" id="80-155-126" 
        transform="rotate(-90, 168, 126)" y="126" x="168" style="pointer-
         events:inherit">A100A</text>
   </g>
  </svg>

I tried in the following way but didnt get succeeded

assertEquals(driver.findElements(By.xpath("//*[local-name()='svg' 
 and namespace-uri()='http://www.w3.org/2000/svg' and @id='svgcontent']//*[local-
 name()='g' and namespace-uri()='http://www.w3.org/2000/svg']/text")).size(), 1);
  • 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-06-15T15:59:09+00:00Added an answer on June 15, 2026 at 3:59 pm

    try following

    assertEquals(driver.findElements(By.xpath("//*[local-name()='svg' and @id='svgcontent']//*[local-name()='text']")).size(), 1); 
    

    it should work, but

    assertEquals(driver.findElements(By.xpath("//*[local-name()='svg' and namespace-uri()='http://www.w3.org/2000/svg' and @id='svgcontent']//*[local-name()='g' and namespace-uri()='http://www.w3.org/2000/svg']/*[local-name()='text']")).size(), 1);
    

    should be also ok.

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

Sidebar

Related Questions

I have the following HTML code: <div style=background-image:url(~/Images/MyImage.jpg); width:100%; height:100%> I'm not too familiar
I have the following html code: <html> <body> <style> div{border:solid 1px;} .cool{width:400px;height:102px; overflow:auto;} .cool
I have the following html code with Jquery Sorting <div class=sortable style='width:700px; margin: 0
I have the following html code. <html> <body> <div style=max-width:1600px; min-width:900px; > <table> </table>
I have the following html code: <table> <tr> <td> <div id=fixmywidth style=position:relative; height:30px;> <div
I have the following html code: <ul class=smenu> <li class=smenuitem><a href=http://ux.stackexchange.com/></a></li> <li class=smenuitem><a href=http://area51.stackexchange.com/></a></li>
I have the following HTML code: <td class=myclass width=1% align=right ><a href=javascript:goToNav(); id=top><img id=navup
I have the following HTML Code: <div style=width: 960px; margin: 0; padding: 0;> <table
I have the following HTML code: <div id=Activity class=rep_tb0 style=width: 100%> <div class=rep_tr0 style=width:
I have the following HTML code : <table class=report width=100%> <thead> </thead> <tbody> <tr

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.