none
Browser.Navigate functionality in HAT RRS feed

  • Question

  • Hi All,

    I am implementing CCF 2009  and using HAT for web application automation.

    For one application I need the browser to navigate to certain page on some action.

    In legacy adapter i done the same by using Browser.Navigate function.But in HAT workflow project i am not able to implement it.

    Please guide me.Thanks in advance.
    Tuesday, September 8, 2009 2:35 PM

Answers

  • Hi
    The easiest way to do this is to define a special control to links to the browser URL. This can be done by defining a control in the XML application init string in the CCF configuration as follows under the DataDrivenAdapterBindings/Controls

          <HyperLink name="BrowserUrl">
            <Url>www.google.com</Url>
          </HyperLink>
    HAT understands this special control as a reference to the URL.
    Then in the workflow, you use 2 activities
    1) SetControlValue. The control is BrowserUrl and the value is the URL you want to navigate to.
    2) ExecuteControlAction. This will actually do the navigation, the first activity sets the URL and this activity tells the browser to navigate to the URL.

    If you are using a DataDrivenAdapter, you can also navigate to certain events with a simple WebBrowser.Navigate.
    Craig
    • Marked as answer by Neeraj Sapra Tuesday, September 15, 2009 2:04 PM
    Monday, September 14, 2009 2:07 PM

All replies

  • Hi
    The easiest way to do this is to define a special control to links to the browser URL. This can be done by defining a control in the XML application init string in the CCF configuration as follows under the DataDrivenAdapterBindings/Controls

          <HyperLink name="BrowserUrl">
            <Url>www.google.com</Url>
          </HyperLink>
    HAT understands this special control as a reference to the URL.
    Then in the workflow, you use 2 activities
    1) SetControlValue. The control is BrowserUrl and the value is the URL you want to navigate to.
    2) ExecuteControlAction. This will actually do the navigation, the first activity sets the URL and this activity tells the browser to navigate to the URL.

    If you are using a DataDrivenAdapter, you can also navigate to certain events with a simple WebBrowser.Navigate.
    Craig
    • Marked as answer by Neeraj Sapra Tuesday, September 15, 2009 2:04 PM
    Monday, September 14, 2009 2:07 PM
  • Thanks dude. Your solution worked. I had also implemented the same using operation handler method of 'ExtendedDDA', where I navigate the WebBrowser to the required Url. However, your solution is more convenient and fits into the HAT logic I already have. I am developing a AgentDesktop solution using CCF 2009, where I have multiple Windows and Web applictions that are automated. I use the CCF 2009 Developer's Guide for reference. But was just wondering, if you could give me some more references to help me with HAT adapters.
    Tuesday, September 15, 2009 2:16 PM