Forum Discussion
Hi Priyanka,
>>>
it neither give any output even though it satisfies the condition ,control does not goes inside the if loop and log the message
<<<
I guess you just have a node which does not meet any of the specified conditions in your document. You can add a Log.Message call in the loop (e.g. Log.Message(nType)) to check all the node types. If this suggestion does not help, I recommend that you set a breakpoint and debug your script (see the "Debugging Tests - Overview" help topic ( http://www.automatedqa.com/support/viewarticle.aspx?aid=11335 ) for more information).
>>>
the above code gives sysntax error on execution
<<<
I believe the error is caused by the following line:
var xeElementCollection = xeRootNode["Elements"]()GetEnumerator();
You missed the "." character between "xeRootNode["Elements"]()" and "GetEnumerator();"