- DHHJ
- Posts : 8
Join date : 2013-03-14
Help with variables
Sun Jun 30, 2013 3:26 am
I am writing test scripts using Webdriver inside of a Pentaho development environment- all code is in javascript.
I have declared a variable in my js code and now need to put this variable inside a selenium.runScript command for further testing on a web page.
The variable that I define is not available to the runScript. I guess I need something like a global variable that can cross over between my js and the runScript.
I hope this makes sense! Please provide some help!!!!
var test = 'Test input'
selenium.runScript("tinyMCE.activeEditor.setContent(test);");
I have tried both HTMLUnit and FireFox drivers.
Thanks!
I have declared a variable in my js code and now need to put this variable inside a selenium.runScript command for further testing on a web page.
The variable that I define is not available to the runScript. I guess I need something like a global variable that can cross over between my js and the runScript.
I hope this makes sense! Please provide some help!!!!
var test = 'Test input'
selenium.runScript("tinyMCE.activeEditor.setContent(test);");
I have tried both HTMLUnit and FireFox drivers.
Thanks!
Permissions in this forum:
You cannot reply to topics in this forum