Use Selenium to verifying the meta tag element using xpath

There is a great need today to validate the meta tags and the contents on a website for google indexing and SEO. Here is an example of using Xpath in selenium to verify the meta tags and the contents.

 

//meta[@id='meta tag id' and @content='Meta tag info.............................']

 

 <tr>
    <td>verifyElementPresent</td>
    <td>//meta[@id='meta tag id' and @content='Meta tag info.............................'] </td>
    <td></td>
</tr>

 

Submitted by Puddupakkam Pavandeep

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: wiki
Posted on: 2/19/2010 at 7:15 PM
Categories: Software Testing
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Comments

Add comment


 

  Country flag

biuquote
  • Comment
  • Preview
Loading