Configuring and Deploying the Support Set

Now that you created the UFT One Custom Server, you need to configure UFT One to use this Custom Server when recording and running GUI tests on the TrackBar control.

To configure UFT One to use the Custom Server:

  1. In the Solution Explorer window, double-click the Configuration.XML file.

    The following content should be displayed:

    <!-- Merge this XML content into file "<UFT One installation folder>\dat\SwfConfig.xml". -->
    <Control Type="System.Windows.Forms.TrackBar">
        <CustomRecord>
            <Component>
                <Context>AUT</Context>
                <DllName>D:\Projects\UFTCustServer\Bin\UFTCustServer.dll</DllName>
                <TypeName>UFTCustServer.TrackBarSrv</TypeName>
            </Component>
        </CustomRecord>
        <CustomReplay>
            <Component>
                <Context>AUT</Context>
                <DllName>D:\Projects\UFTCustServer\Bin\UFTCustServer.dll</DllName>
                <TypeName>UFTCustServer.TrackBarSrv</TypeName>
            </Component>
        </CustomReplay>
        <!--<Settings>
             <Parameter Name="sample name">sample value</Parameter>
        </Settings> -->
    </Control>
    
  2. Select the <Control>...</Control> segment and select Edit > Copy from the menu.

  3. Open the SwfConfig.xml file located in <UFT One installation folder>\dat.

  4. Paste the <Control>...</Control> segment you copied from Configuration.xml into SwfConfig.xml, under the <Controls> tag in SwfConfig.xml. After you paste the segment, the SwfConfig.xml file should look as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <Controls>
        <Control Type="System.Windows.Forms.TrackBar">
            <CustomRecord>
                <Component>
                    <Context>AUT</Context>
                    <DllName>D:\Projects\UFTCustServer\Bin\UFTCustServer.dll</DllName>
                    <TypeName>UFTCustServer.TrackBarSrv</TypeName>
                </Component>
            </CustomRecord>
            <CustomReplay>
                <Component>
                    <Context>AUT</Context>
                    <DllName>D:\Projects\UFTCustServer\Bin\UFTCustServer.dll</DllName>
                    <TypeName>UFTCustServer.TrackBarSrv</TypeName>
                </Component>
            </CustomReplay>
        </Control>
    </Controls>
    
  5. Make sure that the <DllName> elements contain the correct path to your Custom Server DLL.

  6. Save the SwfConfig.xml file.