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"));


23 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. 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
  9. Thanks a lot. This is exactly what I was looking for.

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

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

    reviewcouncil

    Technology

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

    Best Informatica Training center In Chennai
    Informatica Training

    ReplyDelete