Pages

Search This Blog

Thursday, October 21, 2010

How to verify the text ignoring cases sensitivity in selenium ?

How to verify the text ignoring cases sensitivity in selenium ?

Some times we need to verify the text on the webpage no matter is upper cases or lower cases or proper.
We just need to verify the text on the web page ignoring their cases sensitivity.
REGEXPI is used to avoid cases sensitive to verify the text on the page.

Lets say i want to verify the text "Automationtricks is good blog for selenium" No matter its in upper cases or lower case or proper case.

Then use REGEXPI in selenium command selenium.isTextPresent or verifyTextPresent.


<tr>
    <td>verifyTextPresent</td>
    <td>regexpi:AUTOMATIONTRICKS IS GOOD BLOG FOR SELENIUM</td>
    <td></td>
</tr>

<tr>
    <td>verifyTextPresent</td>
    <td>regexpi:AUTOMATIONTRICKS is good blog for selenium</td>
    <td></td>
</tr>

<tr>
    <td>verifyTextPresent</td>
    <td>regexpi:AUTOMAtionTRICKS Is GoOd Blog for SELENIUM</td>
    <td></td>
</tr>

<tr>
    <td>verifyTextPresent</td>
    <td>regexpi:automationtricks is good blog for selenium</td>
    <td></td>
</tr>


In Selenium RC

verifyTrue(selenium.isTextPresent("regexpi:AUTOMATIONTRICKS IS GOOD BLOG FOR SELENIUM"));

verifyTrue(selenium.isTextPresent("regexpi:AUTOMATIONTRICKS is good blog for selenium"));

verifyTrue(selenium.isTextPresent("regexpi:AUTOMAtionTRICKS Is GoOd Blog for SELENIUM"));

verifyTrue(selenium.isTextPresent("regexpi:automationtricks is good blog for selenium"));


25 comments:

  1. It's awesome to pay a visit this web page and reading the views of all colleagues concerning this article, while I am also eager of getting experience.
    My web site: Loans for Bad Credit

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. I think this іs аmong the most important info for me.
    And і am glad reading your aгticle.
    But wanna remаrk on somе general
    thіngs, The ωebsitе stуle іs ideal, the articles iѕ really nice :
    D. Gοoԁ job, cheeгs

    Heгe is my sіte ... New Bingo Sites

    ReplyDelete
  4. Heyа i'm for the first time here. I found this board and I find It really useful & it helped me out a lot. I hope to give something back and aid others like you helped me.

    Visit my blog post payday loans

    ReplyDelete
  5. How can implement this in Selenium Webdriver? Anyone can help!!!

    ReplyDelete
    Replies
    1. You can download directly from here, following examples: There's version 3 available in beta, but you will need to also download selenium server if you use this one:
      http://www.seleniumhq.org/download/

      Delete
  6. Thanks for posting.so nice and mind blowing post
    USB Cables
    http://companies.telecomb2b.com/mobile-charger-parts-and-components/usb-cables.html

    ReplyDelete
  7. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium.
    Selenium

    ReplyDelete
  8. It was very nice blog to learn about SAP HR.Thanks for sharing new things.SAP HR

    ReplyDelete
  9. It was very nice blog to learn about Selenium.Thanks for sharing new things.selenium training in chennai

    ReplyDelete
  10. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.

    Big data training institutes in chennai

    ReplyDelete
  11. Thanks a lot. This is exactly what I was looking for.

    ReplyDelete
  12. Thanks a lot.This is exactly what I was looking for.

    ReplyDelete
  13. The blog you had post is verymuch useful for us to know about the Web designing. thanks for your information sharing ith us.
    Web Designing Institute in Coimbatore
    Web Designing Course
    Web Design Classes
    Website Design Course
    Learning Web Design

    ReplyDelete
  14. Thanks For Your valuable posting, it was very informative

    reviewcouncil

    Technology

    ReplyDelete
  15. One of the best blogs that I have read till now. Thanks for your contribution in sharing such a useful information. Waiting for your further updates.

    IELTS Coaching in Mulund | IELTS Training in Mulund West | IELTS Centres in Mulund East | Best IELTS Coaching Institute in Mulund | IELTS Courses in Mulund | IELTS Coaching Centres in Mulund | IELTS Training in Mulund

    ReplyDelete
  16. Outstanding blog thanks for sharing such wonderful blog with us ,after long time came across such knowlegeble blog. keep sharing such informative blog with us.
    Airport Management Courses in Chennai | Airport Management Training in Chennai | Airline Courses in Chennai | Airport Courses in Chennai | Airline and Airport Management Courses in Chennai

    ReplyDelete
  17. Thanks for your sharing such a useful information. this was really helpful to me.

    Best Informatica Training center In Chennai
    Informatica Training

    ReplyDelete