assertTextPresentXML

What is it?

Verifies that the specified text pattern appears somewhere in the XML document (as opposed to the standard assertTextPresent, which verifies whether or not text appears between HTML <body/> tags).

Licence

Apache License, V2. This code was developed by Chris Arnold for desmondo.com.

How to add it to selenium:

1. Download the attachment and append its contents to your 'user-extensions.js' file.

Example code:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <userInRole>true</userInRole>
</result>
assertTextPresentXML <userInRole>true</userInRole>  
verifyTextPresentXML <userInRole>true</userInRole>  
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 17, 2011

    sai krishna says:

    Hi, I wanted to use assertTextPresentXML to check whether text is present in xm...

    Hi,

    I wanted to use assertTextPresentXML to check whether text is present in xml file.

    I have copied and pasted the code given and in ide options i have added this user-extension.js file and restarted it but still i can't find any change.

    When I try to open user-extension.js file it says Selenium is undefined.

    Can some one please suggest how can I solve this problem