// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by coded UI test builder.
//      Version: 10.0.0.0
//
//      Changes to this file may cause incorrect behavior and will be lost if
//      the code is regenerated.
//  </auto-generated>
// ------------------------------------------------------------------------------

namespace NerdDinner.CodedUI.Tests
{
    using System;
    using System.CodeDom.Compiler;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Text.RegularExpressions;
    using System.Windows.Input;
    using Microsoft.VisualStudio.TestTools.UITest.Extension;
    using Microsoft.VisualStudio.TestTools.UITesting;
    using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;
    using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
    using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
    using MouseButtons = System.Windows.Forms.MouseButtons;
    
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public partial class UIMap
    {
        
        /// <summary>
        /// Login - Use 'LoginParams' to pass parameters into this method.
        /// </summary>
        public void Login()
        {
            #region Variable Declarations
            HtmlHyperlink uILogOnHyperlink = this.UIBlankPageWindowsInteWindow.UINerdDinnerDocument.UILogOnPane.UILogOnHyperlink;
            HtmlEdit uIUsernameEdit = this.UIBlankPageWindowsInteWindow.UILogOnDocument.UIUsernameEdit;
            HtmlEdit uIPasswordEdit = this.UIBlankPageWindowsInteWindow.UILogOnDocument.UIPasswordEdit;
            HtmlInputButton uILogOnButton = this.UIBlankPageWindowsInteWindow.UILogOnDocument.UILoginaccountPane.UILogOnButton;
            HtmlDiv uIWelcomemiyuruLogOffPane = this.UIBlankPageWindowsInteWindow.UINerdDinnerDocument.UIWelcomemiyuruLogOffPane;
            #endregion

            // Go to web page 'about:blank' using new browser instance
            this.UIBlankPageWindowsInteWindow.LaunchUrl(new System.Uri(this.LoginParams.UIBlankPageWindowsInteWindowUrl));

            // Click 'Log On' link
            Mouse.Click(uILogOnHyperlink, new Point(6, 3));

            // Type 'miyuru' in 'Username:' text box
            uIUsernameEdit.Text = this.LoginParams.UIUsernameEditText;

            // Type '{Tab}' in 'Username:' text box
            Keyboard.SendKeys(uIUsernameEdit, this.LoginParams.UIUsernameEditSendKeys, ModifierKeys.None);

            // Type '********' in 'Password:' text box
            uIPasswordEdit.Password = this.LoginParams.UIPasswordEditPassword;

            // Click 'Log On' button
            Mouse.Click(uILogOnButton, new Point(77, 17));

            Assert.AreEqual(this.VerifyExpectedValues.UIWelcomemiyuruLogOffPaneInnerText, uIWelcomemiyuruLogOffPane.InnerText);
        }
                
        /// <summary>
        /// CloseWindow
        /// </summary>
        public void CloseWindow()
        {
            #region Variable Declarations
            WinButton uICloseButton = this.UIBlankPageWindowsInteWindow.UINerdDinnerWindowsIntTitleBar.UICloseButton;
            #endregion

            // Click 'Close' button
            Mouse.Click(uICloseButton, new Point(21, 0));
        }
        
        #region Properties
        public virtual LoginParams LoginParams
        {
            get
            {
                if ((this.mLoginParams == null))
                {
                    this.mLoginParams = new LoginParams();
                }
                return this.mLoginParams;
            }
        }
        
        public virtual VerifyExpectedValues VerifyExpectedValues
        {
            get
            {
                if ((this.mVerifyExpectedValues == null))
                {
                    this.mVerifyExpectedValues = new VerifyExpectedValues();
                }
                return this.mVerifyExpectedValues;
            }
        }
        
        public UIBlankPageWindowsInteWindow UIBlankPageWindowsInteWindow
        {
            get
            {
                if ((this.mUIBlankPageWindowsInteWindow == null))
                {
                    this.mUIBlankPageWindowsInteWindow = new UIBlankPageWindowsInteWindow();
                }
                return this.mUIBlankPageWindowsInteWindow;
            }
        }
        #endregion
        
        #region Fields
        private LoginParams mLoginParams;
        
        private VerifyExpectedValues mVerifyExpectedValues;
        
        private UIBlankPageWindowsInteWindow mUIBlankPageWindowsInteWindow;
        #endregion
    }
    
    /// <summary>
    /// Parameters to be passed into 'Login'
    /// </summary>
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class LoginParams
    {
        
        #region Fields
        /// <summary>
        /// Go to web page 'about:blank' using new browser instance
        /// </summary>
        public string UIBlankPageWindowsInteWindowUrl = "http://uscdcoss190:8080/";
        
        /// <summary>
        /// Type 'miyuru' in 'Username:' text box
        /// </summary>
        public string UIUsernameEditText = "miyuru";
        
        /// <summary>
        /// Type '{Tab}' in 'Username:' text box
        /// </summary>
        public string UIUsernameEditSendKeys = "{Tab}";
        
        /// <summary>
        /// Type '********' in 'Password:' text box
        /// </summary>
        public string UIPasswordEditPassword = "BYNIprPkW8XmAeQA6Xy/8tTCmbWWYFOi";
        #endregion
    }
    
    /// <summary>
    /// Parameters to be passed into 'Verify'
    /// </summary>
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class VerifyExpectedValues
    {
        
        #region Fields
        /// <summary>
        /// Verify that 'Welcome miyuru! [ Log Off ]' pane's property 'InnerText' equals 'Welcome miyuru! [ Log Off ] '
        /// </summary>
        public string UIWelcomemiyuruLogOffPaneInnerText = "Welcome miyuru! [ Log Off ] ";
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UIBlankPageWindowsInteWindow : BrowserWindow
    {
        
        public UIBlankPageWindowsInteWindow()
        {
            #region Search Criteria
            this.SearchProperties[UITestControl.PropertyNames.Name] = "Blank Page";
            this.SearchProperties[UITestControl.PropertyNames.ClassName] = "IEFrame";
            this.WindowTitles.Add("Blank Page");
            this.WindowTitles.Add("http://uscdcoss190:8080/");
            this.WindowTitles.Add("NerdDinner");
            this.WindowTitles.Add("Log On");
            #endregion
        }
        
        public void LaunchUrl(System.Uri url)
        {
            this.CopyFrom(BrowserWindow.Launch(url));
        }
        
        #region Properties
        public UINerdDinnerDocument UINerdDinnerDocument
        {
            get
            {
                if ((this.mUINerdDinnerDocument == null))
                {
                    this.mUINerdDinnerDocument = new UINerdDinnerDocument(this);
                }
                return this.mUINerdDinnerDocument;
            }
        }
        
        public UILogOnDocument UILogOnDocument
        {
            get
            {
                if ((this.mUILogOnDocument == null))
                {
                    this.mUILogOnDocument = new UILogOnDocument(this);
                }
                return this.mUILogOnDocument;
            }
        }
        
        public UINerdDinnerWindowsIntTitleBar UINerdDinnerWindowsIntTitleBar
        {
            get
            {
                if ((this.mUINerdDinnerWindowsIntTitleBar == null))
                {
                    this.mUINerdDinnerWindowsIntTitleBar = new UINerdDinnerWindowsIntTitleBar(this);
                }
                return this.mUINerdDinnerWindowsIntTitleBar;
            }
        }
        #endregion
        
        #region Fields
        private UINerdDinnerDocument mUINerdDinnerDocument;
        
        private UILogOnDocument mUILogOnDocument;
        
        private UINerdDinnerWindowsIntTitleBar mUINerdDinnerWindowsIntTitleBar;
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UINerdDinnerDocument : HtmlDocument
    {
        
        public UINerdDinnerDocument(UITestControl searchLimitContainer) : 
                base(searchLimitContainer)
        {
            #region Search Criteria
            this.SearchProperties[HtmlDocument.PropertyNames.Id] = null;
            this.SearchProperties[HtmlDocument.PropertyNames.RedirectingPage] = "False";
            this.SearchProperties[HtmlDocument.PropertyNames.FrameDocument] = "False";
            this.FilterProperties[HtmlDocument.PropertyNames.Title] = "NerdDinner";
            this.FilterProperties[HtmlDocument.PropertyNames.AbsolutePath] = "/";
            this.FilterProperties[HtmlDocument.PropertyNames.PageUrl] = "http://uscdcoss190:8080/";
            this.WindowTitles.Add("NerdDinner");
            #endregion
        }
        
        #region Properties
        public UILogOnPane UILogOnPane
        {
            get
            {
                if ((this.mUILogOnPane == null))
                {
                    this.mUILogOnPane = new UILogOnPane(this);
                }
                return this.mUILogOnPane;
            }
        }
        
        public HtmlDiv UIWelcomemiyuruLogOffPane
        {
            get
            {
                if ((this.mUIWelcomemiyuruLogOffPane == null))
                {
                    this.mUIWelcomemiyuruLogOffPane = new HtmlDiv(this);
                    #region Search Criteria
                    this.mUIWelcomemiyuruLogOffPane.SearchProperties[HtmlDiv.PropertyNames.Id] = "logindisplay";
                    this.mUIWelcomemiyuruLogOffPane.SearchProperties[HtmlDiv.PropertyNames.Name] = null;
                    this.mUIWelcomemiyuruLogOffPane.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "Welcome miyuru! [ Log Off ] ";
                    this.mUIWelcomemiyuruLogOffPane.FilterProperties[HtmlDiv.PropertyNames.Title] = null;
                    this.mUIWelcomemiyuruLogOffPane.FilterProperties[HtmlDiv.PropertyNames.Class] = null;
                    this.mUIWelcomemiyuruLogOffPane.FilterProperties[HtmlDiv.PropertyNames.ControlDefinition] = "id=logindisplay";
                    this.mUIWelcomemiyuruLogOffPane.FilterProperties[HtmlDiv.PropertyNames.TagInstance] = "5";
                    this.mUIWelcomemiyuruLogOffPane.WindowTitles.Add("NerdDinner");
                    #endregion
                }
                return this.mUIWelcomemiyuruLogOffPane;
            }
        }
        #endregion
        
        #region Fields
        private UILogOnPane mUILogOnPane;
        
        private HtmlDiv mUIWelcomemiyuruLogOffPane;
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UILogOnPane : HtmlDiv
    {
        
        public UILogOnPane(UITestControl searchLimitContainer) : 
                base(searchLimitContainer)
        {
            #region Search Criteria
            this.SearchProperties[HtmlDiv.PropertyNames.Id] = "logindisplay";
            this.SearchProperties[HtmlDiv.PropertyNames.Name] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "[ Log On ] ";
            this.FilterProperties[HtmlDiv.PropertyNames.Title] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.Class] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.ControlDefinition] = "id=logindisplay";
            this.FilterProperties[HtmlDiv.PropertyNames.TagInstance] = "5";
            this.WindowTitles.Add("NerdDinner");
            #endregion
        }
        
        #region Properties
        public HtmlHyperlink UILogOnHyperlink
        {
            get
            {
                if ((this.mUILogOnHyperlink == null))
                {
                    this.mUILogOnHyperlink = new HtmlHyperlink(this);
                    #region Search Criteria
                    this.mUILogOnHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Id] = null;
                    this.mUILogOnHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Name] = null;
                    this.mUILogOnHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.Target] = null;
                    this.mUILogOnHyperlink.SearchProperties[HtmlHyperlink.PropertyNames.InnerText] = "Log On";
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.AbsolutePath] = "/Account/LogOn";
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Title] = null;
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Href] = "http://uscdcoss190:8080/Account/LogOn?returnUrl=%2F";
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.Class] = null;
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.ControlDefinition] = "href=\"/Account/LogOn?returnUrl=%2F\"";
                    this.mUILogOnHyperlink.FilterProperties[HtmlHyperlink.PropertyNames.TagInstance] = "1";
                    this.mUILogOnHyperlink.WindowTitles.Add("NerdDinner");
                    #endregion
                }
                return this.mUILogOnHyperlink;
            }
        }
        #endregion
        
        #region Fields
        private HtmlHyperlink mUILogOnHyperlink;
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UILogOnDocument : HtmlDocument
    {
        
        public UILogOnDocument(UITestControl searchLimitContainer) : 
                base(searchLimitContainer)
        {
            #region Search Criteria
            this.SearchProperties[HtmlDocument.PropertyNames.Id] = null;
            this.SearchProperties[HtmlDocument.PropertyNames.RedirectingPage] = "False";
            this.SearchProperties[HtmlDocument.PropertyNames.FrameDocument] = "False";
            this.FilterProperties[HtmlDocument.PropertyNames.Title] = "Log On";
            this.FilterProperties[HtmlDocument.PropertyNames.AbsolutePath] = "/Account/LogOn";
            this.FilterProperties[HtmlDocument.PropertyNames.PageUrl] = "http://uscdcoss190:8080/Account/LogOn?returnUrl=%2F";
            this.WindowTitles.Add("Log On");
            #endregion
        }
        
        #region Properties
        public HtmlEdit UIUsernameEdit
        {
            get
            {
                if ((this.mUIUsernameEdit == null))
                {
                    this.mUIUsernameEdit = new HtmlEdit(this);
                    #region Search Criteria
                    this.mUIUsernameEdit.SearchProperties[HtmlEdit.PropertyNames.Id] = "username";
                    this.mUIUsernameEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = "username";
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.LabeledBy] = "Username:";
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.Type] = "SINGLELINE";
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.Title] = null;
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.Class] = null;
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.ControlDefinition] = "id=username name=username";
                    this.mUIUsernameEdit.FilterProperties[HtmlEdit.PropertyNames.TagInstance] = "7";
                    this.mUIUsernameEdit.WindowTitles.Add("Log On");
                    #endregion
                }
                return this.mUIUsernameEdit;
            }
        }
        
        public HtmlEdit UIPasswordEdit
        {
            get
            {
                if ((this.mUIPasswordEdit == null))
                {
                    this.mUIPasswordEdit = new HtmlEdit(this);
                    #region Search Criteria
                    this.mUIPasswordEdit.SearchProperties[HtmlEdit.PropertyNames.Id] = "password";
                    this.mUIPasswordEdit.SearchProperties[HtmlEdit.PropertyNames.Name] = "password";
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.LabeledBy] = "Password:";
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.Type] = "PASSWORD";
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.Title] = null;
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.Class] = null;
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.ControlDefinition] = "id=password name=password value=\"\" type=";
                    this.mUIPasswordEdit.FilterProperties[HtmlEdit.PropertyNames.TagInstance] = "8";
                    this.mUIPasswordEdit.WindowTitles.Add("Log On");
                    #endregion
                }
                return this.mUIPasswordEdit;
            }
        }
        
        public UILoginaccountPane UILoginaccountPane
        {
            get
            {
                if ((this.mUILoginaccountPane == null))
                {
                    this.mUILoginaccountPane = new UILoginaccountPane(this);
                }
                return this.mUILoginaccountPane;
            }
        }
        #endregion
        
        #region Fields
        private HtmlEdit mUIUsernameEdit;
        
        private HtmlEdit mUIPasswordEdit;
        
        private UILoginaccountPane mUILoginaccountPane;
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UILoginaccountPane : HtmlDiv
    {
        
        public UILoginaccountPane(UITestControl searchLimitContainer) : 
                base(searchLimitContainer)
        {
            #region Search Criteria
            this.SearchProperties[HtmlDiv.PropertyNames.Id] = "login-account";
            this.SearchProperties[HtmlDiv.PropertyNames.Name] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.InnerText] = "using a NerdDinner account\r\nUsername:  \r";
            this.FilterProperties[HtmlDiv.PropertyNames.Title] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.Class] = null;
            this.FilterProperties[HtmlDiv.PropertyNames.ControlDefinition] = "id=login-account";
            this.FilterProperties[HtmlDiv.PropertyNames.TagInstance] = "22";
            this.WindowTitles.Add("Log On");
            #endregion
        }
        
        #region Properties
        public HtmlInputButton UILogOnButton
        {
            get
            {
                if ((this.mUILogOnButton == null))
                {
                    this.mUILogOnButton = new HtmlInputButton(this);
                    #region Search Criteria
                    this.mUILogOnButton.SearchProperties[HtmlButton.PropertyNames.Id] = null;
                    this.mUILogOnButton.SearchProperties[HtmlButton.PropertyNames.Name] = null;
                    this.mUILogOnButton.SearchProperties[HtmlButton.PropertyNames.DisplayText] = "Log On";
                    this.mUILogOnButton.FilterProperties[HtmlButton.PropertyNames.Type] = "submit";
                    this.mUILogOnButton.FilterProperties[HtmlButton.PropertyNames.Title] = null;
                    this.mUILogOnButton.FilterProperties[HtmlButton.PropertyNames.Class] = "classiclogon";
                    this.mUILogOnButton.FilterProperties[HtmlButton.PropertyNames.ControlDefinition] = "class=classiclogon value=\"Log On\" type=s";
                    this.mUILogOnButton.FilterProperties[HtmlButton.PropertyNames.TagInstance] = "5";
                    this.mUILogOnButton.WindowTitles.Add("Log On");
                    #endregion
                }
                return this.mUILogOnButton;
            }
        }
        #endregion
        
        #region Fields
        private HtmlInputButton mUILogOnButton;
        #endregion
    }
    
    [GeneratedCode("Coded UITest Builder", "10.0.40219.1")]
    public class UINerdDinnerWindowsIntTitleBar : WinTitleBar
    {
        
        public UINerdDinnerWindowsIntTitleBar(UITestControl searchLimitContainer) : 
                base(searchLimitContainer)
        {
            #region Search Criteria
            this.WindowTitles.Add("NerdDinner");
            #endregion
        }
        
        #region Properties
        public WinButton UICloseButton
        {
            get
            {
                if ((this.mUICloseButton == null))
                {
                    this.mUICloseButton = new WinButton(this);
                    #region Search Criteria
                    this.mUICloseButton.SearchProperties[WinButton.PropertyNames.Name] = "Close";
                    this.mUICloseButton.WindowTitles.Add("NerdDinner");
                    #endregion
                }
                return this.mUICloseButton;
            }
        }
        #endregion
        
        #region Fields
        private WinButton mUICloseButton;
        #endregion
    }
}
