Micro Focus QTP (UFT) Forums
QTP 9.0 - Unable to do select a node containing ";" - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: QTP 9.0 - Unable to do select a node containing ";" (/Thread-QTP-9-0-Unable-to-do-select-a-node-containing)



QTP 9.0 - Unable to do select a node containing ";" - rsingh - 01-23-2009

I test java applet using QTP 9.0. There are lots of nodes in my application. Like
A
A1
A2
A3
As per the given hirearchy I can select A3 as
Select("A;A1;A2;A3")
I have to pass the node name through data table.
The problem is if the A3 node name is a string as ";".
I cannot select this node because QTP recognizes ";" as node level separator.
And throws error as it cannot reconize the object.
I have tried to pass an escape sequence but problem still exists.
Let me know how can I achieve this objective.
Note : I tried to record my activity for selecting the node here I get
Select("A;A1;A2;;")
But during run this is throwing error.


RE: QTP 9.0 - Unable to do select a node containing ";" - MR21135 - 01-23-2009

Hi rsingh,
Step 1: Get the value in a variable
Step 2: Replace ";;" i.e. vVariable = Replace(vValue, ";;", ";#")with some dummy value as ';#' and store it in a variable
Step 3: Now find the position inturn where '#' here means ';'
Step 4: according to the position select the node

I hope i am answering u'r question.