SelectSingleNode Method

Relevant for: API testing only

Description

Selects a single node from an array containing input/output properties.

Class

This method is not part of a UFT API testing class, but is invoked by the InputEnvelope object.

Syntax

<activity>.InputEnvelope.SelectSingleNode("<fully qualified Xpath>").<supported object/method>

Parameters

Parameter Description
Fully qualified XPath The XPath to the property node in the array. Right-click the property/parameter name in the Input/Checkpoints tab in the Properties pane and select Copy Fully Qualified XPathto retrieve this information.

Return Type

No explicit return - enables the test to access the property or parameter.

Example

var GetFlights_Input_Departure_City = GetDataSource("WebServiceData!Input").GetValue(this.Loop2.CurrentIterationNumber-1, "DepartureCity").ToString();
StServiceCallActivity4.InputEnvelope.SelectSingleNode("/*[local-name(.)='Envelope'][1]/*[local-name(.)='Body'][1]/*[local-name(.)='GetFlights'][1]/*[local-name(.)='DepartureCity'][1]").InnerText = GetFlights_Input_Departure_City;