I am doing a POC on whether we can use RFT for recording Functional Flows for our application. Please bear with me if i sound novice.
I am using RFT 126.96.36.199 on Windows XP, and am trying to record a simple Login and Logout test. I am using the "java scripting" mode for recording to get a proper java class as a recorded test case.
When I record the test, I get the main method, something like this:
public void testMain(Object args)
// HTML Browser
// Document: Application Name: http://IPaddress/xyz/xyz/login.do
// Document: Application Name: http://IPaddress/xyz/xyz/processLogin.do
This test has following steps:
1) Open Login screen, wait for it to load.
2) Click username textbox, enter username
3) Click password textbox, enter password
4) Click login
5) Wait for next screen to load
When I replay the recorded script, the script is stuck at:
And, I get the following Exception:
Could not find a Text role attribute for the object.
However, when I change the browser to IE8 (in Configure Applications for Testing), the same script runs without any problem.
Can someone explain if this is an RFT issue or a product issue (not proper support for FF in my product).
This topic has been locked.
4 replies Latest Post - 2012-10-09T14:49:17Z by testguy
Pinned topic Replay of script recorded on FF10 for dojo based application not working
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-09T14:49:17Z at 2012-10-09T14:49:17Z by testguy
Re: Replay of script recorded on FF10 for dojo based application not working2012-10-08T07:09:46Z in response to vishalenduCan anyone please reply to my question.
We have the following options:
If this issue is because of RFT, we will need this to be fixed from Rational. And this would be a showstopper.
If this issue is because of my product, we can get it fixed from our Development and still be able to use RFT.
If we can get an understanding about the cause of this issue, we can decide whether we can use RFT for our automation or we need to look for other alternatives.
Thanks in advance,
testguy 2700012C0A3 PostsACCEPTED ANSWER
Re: Replay of script recorded on FF10 for dojo based application not working2012-10-08T14:46:10Z in response to vishalenduHi Vishalendu,
Have to tried "stepping" throught the code in debug mode?
It might be possible that the script is executing too fast and the browser is too slow to load.
You can either step in the various lines of code using RFT, or maybe just add a statement to wait for the username edit box to be displayed, as in:
text_username().waitForExistence(); (using the code you supplied).
I have experienced issues like that using recorded scripts a long time ago (I no longer do that), and older browser (IE 6 and IE7).
My scripts now wait for specific controls to be available before continuing running.
Have a good day,
Re: Replay of script recorded on FF10 for dojo based application not working2012-10-09T08:07:19Z in response to testguyHi André,
Thanks for your reply.
The "waitForExistence()" method I have used (as you can see in my initial post) will wait till the login form is loaded. This login form has the "username" and "password" fields. So I dont think that the script is running too fast. To double check I had also added thinktime between the form load and the click on the username text box, but that doesnt change anything.
The reasons I posted here was because I was out of ideas on the troubleshooting. If there is no way to troubleshoot this issue, I would perhaps log a PMR for this.
As far as I can guess, the RFT is not able to identify the text box even though it is there. Is there anyway, in which I can just print/log all the elements on a screen to some log, this way I can check whether the text box has loaded for RFT or not.
testguy 2700012C0A3 PostsACCEPTED ANSWER
Re: Replay of script recorded on FF10 for dojo based application not working2012-10-09T14:49:17Z in response to vishalenduHi Vishalendu,
I have encountered problems when waiting for a form to load. Sometimes, RFT seems to think that, if IE (which is the browser that I am using) has display some of field on the screen, the page is loaded.
That is why, in my tests, I wait for the browser's existence, and then check for the field's existence (and wait and wait if it is not displayed yet). This solved many problems for me.
I wrote a routine a while ago to extract all the information from a displayed form.
The routine get the highest level browser object (root test object), then cycles through all the children items objects of type:
Password (still wrestling with password fields)
TextArea (Multiline edit boxes)
buttons and Submit (which are also buttons)
I am included a modified version of my routine in a file. You may want to modify the code to just report all the properties for each item, as in:
I am sure that other people have created better routines, but I just use it whenever I just want to get the names of the elements on the screen while debugging or creating a new script. Nothing fancy here.
I suggest calling the method once the browser has finished loading all the objects.