I'm using Selenium 2.0 IDE in Firefox to record my test cases. I have written some backing JavaScript to help with making the program a bit more dynamic.
The problem I am having is that whenever I try to export to C# or Java Webdriver code in the test....() section it does not recognize my JavaScript functions. In the generated Webdriver code it has a commented line saying something like
// ERROR: Caught exception [unknown command [navigateDashboard]]
So I guess my first question is that is it even possible to export Selenium IDE test cases to Webdriver code if there is JavaScript, and the second being if so then how?
Thanks, I've looked everywhere for an answer but can't seem to find anything confirming this.
EDIT (In response to arran): In the IDE I have a command like this:
navigateDischarges | |
"navigateDischarges" is a JavaScript function:
Selenium.prototype.doNavigateDashboard = function() {
this.browserbot.openLocation(this.getURL(dashboard)) ;
}
Selenium.prototype.getURL = function(input) {
return (prefix + input);
}
I know this is a simple example, but I was hoping to do more advanced things with it.