Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Test automation for RAP-based application using HP/Microfocus UFT(What is the best way to automate a RAP application for test automation?)
Test automation for RAP-based application using HP/Microfocus UFT [message #1806296] Tue, 07 May 2019 13:03 Go to next message
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 49
Registered: May 2016
Member
Hi,
we are attempting to implement automated regression testing for our application.
I am part of the team who developed the RAP application, some other people in our company are implementing the test scripts.
I added special attributes to the DOM which the UFT-tool can use to identify the different elements of the application.

Clicking on elements (buttons, input fields) seems to work fine.
But just by setting the text to some DOM input field, this field's value isn't reported to the Java servlet and it may not even be recognized as being changed. The developers of the test script do not want to rely on keypress events, because of focus issues.

I think that the only way to reliably simulate user input needs to involve some Javascript functions which (after a value has been changed within the DOM) trigger the synchronization of that value to the Java servlet.

Provided that the test tool is able to call Javascript functions directly, I am prepared to add a global Javascript function, which identifies the widget, sets or updates it's value.

Does anybody have an idea where in the RWT code I should start looking?

Best regards,
Gunnar


Re: Test automation for RAP-based application using HP/Microfocus UFT [message #1806339 is a reply to message #1806296] Tue, 07 May 2019 21:29 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
You could try some Javascript like this:
rap.getObject($0.parentNode.rwtWidget._rwtId).setText('something')

Where $0 is the input element of an RWT Text widget.
You can click on a button by calling the setSelection(true) function.

Depending on which HTML element you've got, you may need to look up the parent nodes until you find the one with the rwtWidget property.
Re: Test automation for RAP-based application using HP/Microfocus UFT [message #1806372 is a reply to message #1806296] Wed, 08 May 2019 09:07 Go to previous message
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 49
Registered: May 2016
Member
Chris,
Thank you very much for your quick response.
This will be very helpful.

Regards,
Gunnar
Previous Topic:Tomcat 8.5 WAR deployment
Next Topic:Application freezes occasionally
Goto Forum:
  


Current Time: Wed Apr 24 14:11:47 GMT 2024

Powered by FUDForum. Page generated in 0.02854 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top