I am using the Selenium 2.0 IDE in Firefox to record my test cases. I wrote some JavaScript support to help make the program more dynamic.
The problem that I am facing is that whenever I try to export 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: Fixed exception [unknown command [navigateDashboard]]
So, I think my first question is that it is even possible to export test cases of Selenium IDE to Webdriver code, if there is JavaScript, and the second - if so, then how?
Thank you, I searched everywhere for an answer, but I canβt find anything to confirm this.
EDITOR (In response to arranging): 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 complex things with it.
source share