Dashboard > Selenium > ... > Contributed User-Extensions > assertTextPresetCount
Selenium Log In View a printable version of the current page.
assertTextPresetCount
Added by isaac otao, last edited by isaac otao on May 30, 2006  (view change)
Labels: 
(None)

description

assertTextPresetCount command verify that the specified text is present with specified count in the page content.

This command was made based on assertTextPresent command.
assertTextPresent command cannot verify that same text presents several times in the page content, this command verify how many times the text presents.

If you specified "1" as count, you can use this command as well as assertTextPresent command, and "0" as assertTextNotPresent command.

example of use

command expected text expected count
assertTextPresentCount You are now logged in. 1
verifyTextPresentCount error! 2

notes

-Use this extension with Selenium(Selenium Core) 0.6 or 0.7.x.

license

This user extension is available under Apache License 2.0.
It is Copyright DTS corporation. 2006.

download

assertTextPresentCount ver.1.0

Hi:

I would suggest to rename this function to assertTextCountPresent in order to let selenium to generate the following functions :

verifyTextCountPresent
storeTextCountPresent

assertTextCountNotPresent
verifyTextCountNotPresent
storeTextCountNotPresent

Posted by harmin at Oct 23, 2006 05:57

Hi,

Just want to add this extension works with the latest v0.8.2 as well. I just verified that so you can update the notes!

Many thanks, Isaac!

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators