How to get object reference to the same objects with different text
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get object reference to the same objects with different text
I write tests for oracle forms, where there are many cells with the same javaclass, but different text.
Is there usful a way to record in testmap only one cell and find it by text parameter?
I know only 2 ways:
by script, this is not useful because I needed or write script for each form or pass as a parameter each form
by project variables, this is not useful because I needed to past variable value before each call to the object
Also becouse of there many cells and forms I have create too much variables and script.
for example, I have cell with follow properties:
AWTComponentAccessibleName = date an time
AWTComponentIndex = 7
JavaFullClassName = oracle.forms.ui.VTextField
wText = 01.01.2017 00:00:00
I want refer to cell by follow properties: JavaFullClassName and wText and pass wText as parameter/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You can map one object using variable to define its wText property:
Now to call the appropriate cell you just need to assign the proper value to wText variable before call.
...or use the Find method:
def get_cell(wText): return Aliases.yourApp.Find( ["JavaFullClassName", "wText"],
["oracle.forms.ui.VTextField", wText], 100 )
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
now I use both: and scripts and project variable in testmap
I was hoping there is a more elegant solution
