RFT Behaving differently when run from a command line -


the following code behaves differently when executed rft ide vs. command line.

public void browsererror() {     startbrowser("");     sleep (1);      testobject[] = find(atdescendant(".class", "html.htmlbrowser"));      system.out.println("object found: " + to.length);     logmessage(messtype.info, "object found: " + to.length);  } 

if there 1 browser open when run code rft ide, length of "to = 1". however, when run command line "to = 0".

it seems browser instance never gets registered never finds it.

what's more puzzling code works on different machine, know in environment messed up. don't know is.

thanks in advance.

the problem experiencing due jvm used machine vs. jvm used rft. of writing, rft runs on java 1.7 , not support 1.8. rft uses version 1.7 execute scripts. when run script command line, uses computer's default jvm, in case version 1.8 when executed find command, couldn't see other browsers.

thanks prakash, 1 of rft developers in ibm india pointing out.

so moral of story this, when executing command line, must explicitly use same jvm rft uses, translates into:

%ibm_rational_rft_eclipse_dir%\jdk\bin\java.exe ... (uses java.exe in dir)
vs.
java ... (which uses machine's default jvm)

i hope helps in future.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -