Automatic creation of functions

Default additional functions

Previously, I have shown you how to create user defined function, which can take maximum of 2 parameters. you might imagine creating an isXxx() or getXxx() function created by you, now selenium will have generated storeXxx, assertXxx, assertNotXxx, verifyXxx, verifyNotXxx, waitForXxx, and waitForNotXxx commands.

Selenium.prototype.Xxx = function(locator, text) {
    return this.<<yourseleniumcall>>;
};

Comments

  1. I have gone further and created a small pocket sized framework too, was feeling lazy to add it on blog :) but will sure do soon!

    ReplyDelete

Post a Comment

Popular Posts