I have user-extensions.js that contain the following code of snippet:
Selenium.prototype.doTypeRepeated = function(locator, text) {
// All locator-strategies are automatically handled by "findElement"
var element = this.page().findElement(locator);
// Create the text to type
var valueToType = text + text;
// Replace the element text with the new text
this.page().replaceText(element, valueToType);
};
I want to call this function from java code using Selenium RC for a text field ("css=input.text"). How can I call this?