Dynamic change in JTree java component name
Hi, Iam working on WInRunner 7.6 on a java based application. I have a Jtree which is mapped to a list in WInrunner. When i click on a child the code looks like this:
" list_select_item("JTree", "!Preview Settlement;.*"& exceptions; 1892 Red, 3 Amber, 293 Other;9 Preview Settlement");"
When i run the script the numbers in the string change and hence the object in not recognised.
I need to take care of all the numbers in the string which change dynamically.
Does anyone have any suggestions? Can i use regular expressions?
Re: Dynamic change in JTree java component name
For this purpose I developed a function list_select_item_regEx() with same parameters as list_select_item().
It reads all items in the list and compares them by using match() - which allows regEx. Then it selects the first item that matches.
Problem: Reading all items in the list may take some time. If the list values are changing very fast this may be a problem...