Reflection 2014 .NET API Guide
Get a Web Object
using System;
using System.Collections.Generic;
using System.Text;
using Attachmate.Reflection.Web.Msie;
using Attachmate.Reflection.Framework;

 
//Before you run GetTextFromWebPage, follow the instructions in Get Text From a Web Page
//to create the Webtable.urlx document.

namespace GetTextFromWebPage
{

  class Program
  {

    static void Main(string[] args)
    {

      Attachmate.Reflection.Framework.Application reflectionApplication = MyReflection.CreateApplication("workspace", true);

      if (reflectionApplication != null)
      {

        //Create the Web control.
        IWebControl webControl = (IWebControl)reflectionApplication.CreateControl(@"C:\Users\[user name]\Documents\Attachmate\Reflection\Webtable.urlx");

        if (webControl != null)
        {
          IWebDocument webDocument = webControl.Document;

          if (webDocument != null)
          {

            //Get the Web element by using the xpath.
            IWebElement webElement = webDocument.GetElement("HTML/BODY/TABLE/TBODY/TR[1]/TD[1]");

            if (webElement != null)
            {
              string conversionRate = webElement.InnerText;
              Console.WriteLine("The currency conversion rate from Canadian to U.S. dollars: " + conversionRate);
            }
            else
              Console.WriteLine("Can not find the webElement. Please check the xpath for the webElement.");
          }
          else
            Console.WriteLine("Fatal error. Check the Reflection installation.");

        }
        else
          Console.WriteLine("Can not create the Web control. Check the Web session file path.");
      }
      else

        Console.WriteLine("Failed to get Application object. Check the Reflection installation and the API port number.");

    }

  }

}