Dashboard > Selenium > ... > Contributed User-Extensions > isOneOfPresent
Selenium Log In View a printable version of the current page.
isOneOfPresent
Added by Chuck Hill, last edited by Chuck Hill on Mar 29, 2008
Labels: 
(None)

Description

Used to checked for at least one match for a list of locators for use in assert, verify, waitFor, etc. This is useful when you can't predict which will be present, or when they changed due to AJAX updates (e.g. Abort link changes to Show Results link).

There is no related IDE extension, these need to be created manually.

Example of Use

<html>
    <head>
    </head>
    <body>
        Some <b>text</b>here.
        <span id="element1">First element</span>
        foo, bar, baz as text
       <span id="element2">Second element</span>
    </body>
</html>
verifyOneOfPresent foo,element1,baz
verifyOneOfNotPresent foo,bar,baz
verifyOneOfPresent foo,element1,baz,element2
waitForOneOfPresent element2,element1

License

Public domain

Download

isOneOfPresent.zip

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