Hey guys,

Ages ago I was asking about testing XML files with selenium and got a "doesn't work" response, well - it does now, and it turned out to be really simple.

I've changed selenium-browserbot.js to use:

PageBot.prototype.bodyText = function() {
    if (this.currentDocument instanceof XMLDocument) {
        return new XMLSerializer().serializeToString(this.currentDocument);
    } else {
        return getText(this.currentDocument.body);
    }
};

This simple checks for an XMLDocument object and serializes it down to a string.  Now I can do things with it like verifyTextPresent.

Mark
_______________________________________________
Selenium-users mailing list
Selenium-users@lists.public.thoughtworks.org
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users

Reply via email to