Contributions
How to re-use a Keyword test in different projects?
Having a keyword test created and working fine in on project. Try to add this keyword test in another project, however it failed due to unable to find the object. Looks like the NameMapping does not work in another project. Do I need to copy the NameMapping? How to do?6.6KViews0likes1CommentHow to avoid running functions defined in a script?
In JScript, there are: function main(){ f1(); f2();} function f1() function f2() I found that when running the script, it runs main -> f1, f2 then f1 and f2. How to avoid running f1 and f2? define f1 and f2 in another scripts then add unit reference to call them?7KViews0likes1CommentRe: Keyword test for multiple languages/browsers
I found the way to find the language of the OS, however still need to know how to find the language of the browser. function getHostLanguage(){ var result = Storages.Registry("Control Panel\\International\\", HKEY_CURRENT_USER); var lanaguage = result.GetOption("sLanguage",0); Log.Message(language);//show me current language return language; }648Views0likes0CommentsRe: How to create a simple data file for testing input?
I found a way to create a script for storing variables: 1. Create a script which define the variable as var languages = new Array("AR", "CS", "EN"); 2. Add Unit References of the script created in the step 1 to the script which uses the variable. 3. In the script which uses the variable declare: var var1 = dataInput["languages"] 4. The second script can access languages via var1. Please advise and provide more standard/flexible way to do that.696Views1like0CommentsHow to create a simple data file for testing input?
In script, it needs to fill in data into different inputs of web. What and how to creat a file which collects the data working as variables for scripts? For example, in JScript a variable lanaguages: var languages = new Array("AR", "CS", "EN"); How/where to put this array in a separated file that a script or keyword test can access it? Currently, I insert this array into a script and the script make is as a global project variable for the keyword test can access it. Is there a better way to do that?6.7KViews0likes1CommentRe: How to change the file name of the logged picture
I found the way to save the picture to another file. screenShot = Utils.Picture; Sys.Clipboard = Sys.Process("notepad").Window("Notepad", "* - Notepad").Picture(); screenShot = Sys.Clipboard screenShot.SaveToFile("C:\\Logs\\TestingScreenshot.jpg"); Picture SaveToFile method: http://support.smartbear.com/viewarticle/31697/ Clipboard property: http://support.smartbear.com/viewarticle/29817/610Views1like0Comments