Hello, I am new to the iTest, and I am trying to use iTest swing to test our java GUI.
I once used QTP and silktest, both of them can create an objects repository. In the case of GUI changes, for these 2 tools, I only need to reivse the corresponding GUI object in the objects repository and don't need to revise all test cases directly.
But in the iTest, I haven't found objects repository or similar settings till now, who can instruct me how to deal with java GUI changes with iTest.
Do we already have objects repository or similar settings?
If no, what can I do for sample below?
Thanks a lot.
Sample:
I used this action in around 100 cases: click //button [@text='Login'] left.
One day, button's text is changed to 'Click to Login'.
Answer by sreenath reddy · May 14, 2011 at 12:20 AM
Hi,
In iTest window click,describe,select,set Text etc are action items.
These are not dependant upon the text written on button.iTest mactes the objects with their names or id.
So, if you cange the text written on a button "click" to "login" ,it will not affect the action item.
Hope this will help you.
Thank you for your answer
But my sample is just an example.
I am just wondering, if a GUI component' identifier was changed, such as it's id, name or other tag which I am using in my script, what I can do for it?
I don't want to revise all test cases which is using this action.
Although I faced to this problem rarely, but it once happened.
Just like screenshot below, I think changes for any of identifier, name, text or label, will impact my script, especially I have used them in many cases.
Can we create a file and give alias for these java objects, just like a objects repository?
Can I set "button[@name='TSs']" to a global variable, such as named it to TSButton?
And then I enable field substitution to target and replace action in screenshot with "click ;//TSButton; left"
Maybe it works, let me try...
Hi Daniel,
Did you figure it out? It should work just as you described.
Hi Yujie,
Because I don't know how to define a global variable in A.fftc and use it in B.fftc, I am trying to use Global Parameter File now.
Please see screenshot below, seems it's a workaround.
BTW, can I define a global variable in A.fftc and use it in B.fftc?
Hi Daniel,
Local variable will be availabe only for the current procedure where as global variable will be available for any step within the testcase. I think global parameter file is best option in your case.
Please see the screenshot attached which is taken from iTest help document.
yes, you can use [gset ] command to set a global variable. The way you are using the global parameter file is wrong. You're setting the value to a target on a particular step. That won't work during test case execution. The parameter value are loaded into memory at the beginning of the test case execution. It's going to have the target string as the value, rather than replaced with the actual value of the target.
Are you calling one test case from another? You can also pass in arguments to a different procedure.
Hi Yujie
You said:
====================================================
The way you are using the global parameter file is wrong
====================================================
Why?
I enabled field substitution to target and this way is working fine in my tests and [param TestServerAdmin/MgtIPCombo] can be replaced by it's real value //comboBox[@label='Management IP Address']
Hi Daniel,
In that case, you are right, and I was wrong. Thanks!
Combining web and Swing sessions 2 Answers
How to create a form map for flex application? 1 Answer
Web capture session reports that unable to find jvm.dll in a window titled "NetscapeDispatchWnd" 1 Answer
Check box action not captured 1 Answer
iTest fails to cope with IE opening new instances of itself 1 Answer
Copyright 2008- Spirent Communications, all rights reserved. Terms and Conditions.