Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use regular Expression to find node item in swfTreeView
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
Hello,

I'm new to QTP and evaluating it with Infragistics TestAdvantage at the moment. I have an application with an Infragistics UltraTree which is found by QTP as SwfTreeView. The selection of the nodes in this tree works fine with the select method like this:

Code:
SwfWindow("MyApp").SwfTreeView("myTree").Expand "\Root\Child1\Child2"

This method needs the text of the node to find it. As I can't exactly say what the Child2 nodes text will be (there might be some additional characters in front of "Child2") I wanted to use regular expressions to find the node, is that possible? The following code didn't work for me:

Code:
SwfWindow("MyApp").SwfTreeView("myTree").Expand"\Root\Child1\*Child2"

Is it even possible to use regular expressions in this case?

Is there another possibility to find a node in a tree by a regular expression? Or is it possible to loop through all nodes and compare their text to a given one?

I also tried to get a String with all the nodes using:

Code:
SwfWindow("MyApp").SwfTreeView("myTree").GetContent

and then created a RegExp object to look for the pattern in this string but with no success.

In some thread I read about a check box in QTP to enable the regular expression usage but I can't find it in the qtp application. Do I have to enable it before it works correctly? I'm a bit puzzled about that now.

Any hints about that appreciated.

Regards

Simone
Reply


Messages In This Thread
Use regular Expression to find node item in swfTreeView - by sischmidt - 05-16-2008, 02:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,274 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,218 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,632 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,416 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,036 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)