I have the following function in user-extensions.js
file: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 am using Selenium RC with Java. I have the Java class file "Services_ProcMethodREOI.java". I used the following line in Java file to call the javascript function typeRepeated():
selenium.getEval("typeRepeated(\"txtAppCode\", \"service5\")");
//txtAppCode is a textfield and service5 is the inputted text on that textfield
When I ran the Java file using eclipse, I found the following error:
com.thoughtworks.selenium.SeleniumException: ERROR: Threw an exception: Object expected
Pls suggest me how can I solve it.