It's all about the answers!

Ask a question

Why does an RFT script launched via RQM not work properly in IE9?


Andrew Trobec (49712144139) | asked Jun 11 '13, 10:00 a.m.
Hello,
I have a simple RFT 8.3 script that has to insert data into a form on a webpage and click submit at the bottom.  When running it locally on my machine everything works perfectly in IE9.  When I add the script to RQM and run it through the adapter, however, it does not work.  It does not seem to understand the setText() method for text fields and just freezes.
I have tried <object>.click() before <object>setText("text here") but it makes no difference.  It registers the click, but not the text insert.
Is there any way around this?
Best regards,
Andrew

7 answers



permanent link
Sunil Kumar R (1.1k13044) | answered Jun 11 '13, 10:17 a.m.
JAZZ DEVELOPER
 The issue you are seeing could be un-related to RQM executing the RFT script..

I would suggest you to try invoking the RFT script through command line (instead of eclipse / MSVS GUI mode) and confirm that it works?
Here are the details on running RFT script in command line mode :

http://www.ibm.com/developerworks/rational/library/run-scripts-through-the-rational-functional-tester-command-line/
http://publib.boulder.ibm.com/infocenter/rfthelp/v8r3/topic/com.ibm.rational.test.ft.doc/topics/RobotJCommandLine.html

Best Regards, Sunil

Comments
Andrew Trobec commented Jun 12 '13, 2:38 a.m.

Hello Sunil,


Thank you for your feedback.  When run from command line, the script does not work.  What does this mean?

I have JRE Version 6 Update 45 on my system which is used by default, but I also used the JRE packaged with RFT.  The result is the same.  When run from Eclipse, it works with both environments.

I noticed that while the script is running it freezes on setText() until I click on another textbox.  From there it will insert the text it was supposed to insert, but in the wrong textbox and then continue until it freezes at the next setText().

The script runs fine when Chrome is the default browser in all three scenarios (Eclipse, command line, and RQM adapter).

Do you have any suggestions?

Thank you and best regards,

Andrew


permanent link
Rafael Rodriguez Montes (23013126247) | answered Jun 11 '13, 11:10 a.m.
Review the properties of your object, may be you have a property that require regular expression like id session, some link or name numeration. are you getting some specific error?

Comments
Andrew Trobec commented Jun 13 '13, 2:53 a.m.

Hello Rafael,


Thanks for your input.  I have played with the object properties but unfortunately this makes no difference.  The script doesn't fail, it just freezes until I click somewhere and then it jumps back to life and freezes at the next point.  This continues until the script ends.

Regards,

Andrew


permanent link
Rafael Rodriguez Montes (23013126247) | answered Jun 13 '13, 10:30 a.m.
 Hi,
if you want to make sure run ie as administrator, you can try run ie using java, something like this :
  String  commands [] = new String [] {
    "CMD.EXE",
    "/C",
    "RUNAS /profile  /savecred /user:"
    + "administrator"
    + " " + "ie.exe"
  };
	
 Runtime.getRuntime().exec(commands);
	

Comments
Andrew Trobec commented Jun 14 '13, 2:45 a.m.

Hello Rafael,


This is an excellent suggestion, thanks!

Regards,

Andrew


permanent link
Sunil Kumar R (1.1k13044) | answered Jun 12 '13, 3:46 a.m.
JAZZ DEVELOPER
 Hello Andrew,

I find that you have verified running from command line with IBM JRE (packaged with RFT) also?
If yes, there is nothing additional we could check on the same line.

One of the things you could try is verify that the properties of the object are varying (it is dynamic). In which case regEX can be used in their values as suggested by Rafael.

Meanwhile, you could try rule out the issue being specific to a script by trying a simple script.. eg. script { Launch google.com on IE9, click on search text box, enter text.}
Now, try this script in all modes (UI, cmd) and check if there is any difference?

If none help, I would suggest you log a PMR http://www.ibm.com/planetwide/us/

Best Regards, Sunil

Comments
Andrew Trobec commented Jun 13 '13, 2:31 a.m.

@sunilkumarr


When trying to insert a test object using IE9 the whole application freezes!  I can't even add the search box for Google.

When I add it using Chrome and run, everything is fine.  Unfortunately the identified objects are not recognised by IE9 so the script always fails, even after toying with the object weights.  The annoying thing with Chrome is that the plugin for RFT always asks me to authorise Java for every single page.  It's irritating.

I can't add Firefox as a browser because RFT won't accept the folder because "The [C:\Program Files (x86)\Mozilla Firefox] file is not the specified directory for an installed browser."

Is there some sort of configuration that I'm missing?  I am finding the tool impossible to use and not worthwhile.

I am using Windows 7 64-bit.

Regards,

Andrew


Sunil Kumar R commented Jun 13 '13, 2:40 a.m.
JAZZ DEVELOPER
Andrew, thank you for trying the suggestions.
Ya its awful at times, but I am sure we will be able to evade the behavior.

Could you please log a PMR (a service request) so that a TSE can assist you on this issue from RFT perspective?
(Please use the Open Service Request) option in the web page : http://www.ibm.com/planetwide/us/

Best Regards, Sunil

Andrew Trobec commented Jun 13 '13, 2:56 a.m.

@sunilkumarr


I managed to record the script for Google in IE9.  The objects get added to the object map when I record the script (it doesn't work when I just want to add one using the drag feature).

When I play the script from RFT it works.  When I run it via command line it doesn't.  This is what it looks like:

startApp("Google");
text_search().setText("Test");
button_submitbtnG().click();

The setText() doesn't work.

I will try to get into contact with IBM.

Regards,

Andrew


Andrew Trobec commented Jun 13 '13, 3:05 a.m.

@sunilkumarr


When I launch the script in CMD that has been run with admin privileges it works!

My question now becomes, how do I ensure that the script gets run with administrative privileges when it is invoked via the RQM adapter'

Regards,

Andrew


Andrew Trobec commented Jun 13 '13, 3:25 a.m.

 @sunilkumarr


It's not about the IE9 session being run as admin, it's about the CMD session running launching the test being run as admin.  I don't know how to ensure that the script gets invoked as admin via the RQM Test Script.

Regards,

Andrew


Andrew Trobec commented Jun 13 '13, 4:02 a.m.

 @sunilkumarr


It works when the adapter is run with admin privileges!  Problem solved.

Regards,

Andrew

showing 5 of 6 show 1 more comments

permanent link
Ajay Chebbi (3113) | answered Jun 12 '13, 9:00 p.m.
JAZZ DEVELOPER
@andrew try opening RQM in Chrome (since your RFT script is for IE9). I have seen that if a browser instance is already open, RFT has some trouble running the script on it. (Just make sure that you can run it from RFT once)

Comments
Andrew Trobec commented Jun 13 '13, 2:05 a.m.

Hello Ajay,


I am running the script from Firefox, but I have also tried Chrome as you suggested.  Unfortunately it makes no difference.

Regards,

Andrew


permanent link
Sunil Kumar R (1.1k13044) | answered Jun 13 '13, 3:11 a.m.
JAZZ DEVELOPER
Nothing specific to mention in script. Can you try using IE session (fresh, close all existing, restart) started with "Run as Administrator".. ? check if the issue persists?

Best Regards, Sunil

permanent link
Sunil Kumar R (1.1k13044) | answered Jun 13 '13, 3:37 a.m.
JAZZ DEVELOPER
Sorry, ya missed 1 more point.. Can you try starting the RFT adapter console
"Programs > IBM SDP > Adapter to Rational Quality Manager > Configure Adapter" with "Run as administrator".. 

Coz, its the adapter which invokes the script on the RFT machine using the script supplied by RQM..

Do let me know your findings..

Best Regards
Sunil

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.