示例#1
0
 /// <summary>
 /// Initializes a new Lynda.Test.ConsumerPages.RegConfirm class.
 /// </summary>
 /// <param name="browserForPage"></param>
 public RegConfirm(Browser browserForPage)
 {
     regConfirmRepo = new RegConfirmRepo();
     browser = browserForPage;
     browser.ClickTitleBar();
     WaitForLoad();
 }
示例#2
0
 /// <summary>
 /// Initializes a new Lynda.Test.ConsumerPages.RegPageStep1 class. Does not select a subscription or enter any account information.
 /// </summary>
 /// <param name="browserForPage">Browser instance containing the consumer registration page step 1.</param>
 public RegPageStep1(Browser browserForPage)
 {
     regPageStep1Repo = new RegPageStep1Repo();
     browser = browserForPage;
     browser.ClickTitleBar();
     WaitForLoad();
 }
示例#3
0
        /// <summary>
        /// Performs the playback of actions in this module.
        /// </summary>
        /// <remarks>You should not call this method directly, instead pass the module
        /// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
        /// that will in turn invoke this method.</remarks>
        void ITestModule.Run()
        {
            Mouse.DefaultMoveTime = 300;
            Keyboard.DefaultKeyPressTime = 100;
            Delay.SpeedFactor = 1.0;

            string installedBrowserPath = Browser.GetInstalledExePath(BrowserProduct.IE);
            if (installedBrowserPath == null)
            {
                throw new Exception("Internet Explorer is not installed.");
            }
            int installedBrowserVersion = Browser.GetInstalledVersion(BrowserProduct.IE);
            if (installedBrowserVersion != 9)
            {
                throw new Exception(string.Format("Internet Explorer version {0} ({1}) is not supported by this test. Supported version: 9.", installedBrowserVersion, installedBrowserPath));
            }

              			const string uri = "www.lynda.com";

            Browser browser1 = new Browser(BrowserProduct.IE, uri, true);
            browser1.HalfSize();
            browser1.Move(100, 100);

            Browser browser2 = new Browser(BrowserProduct.Safari, uri, true);
            browser2.HalfSize();
            browser2.Move(200, 200);

            Browser browser3 = new Browser(BrowserProduct.Firefox, uri, true);
            browser3.HalfSize();
            browser3.Move(300, 300);

            Browser browser4 = new Browser(BrowserProduct.Chrome, uri, true);
            browser4.HalfSize();
            browser4.Move(400,400);

            Ranorex.ATag loginLink;
            const string loginLinkRxPath = "dom/body/div[@id='eyebrow']/div[1]/ul/li[4]/a[@id='login-modal']";

            browser1.ClickTitleBar();
            loginLink = Host.Local.FindSingle<Ranorex.ATag>(loginLinkRxPath);
            loginLink.Click();
            Report.Log(ReportLevel.Info,browser1.CurrentUri);

            browser2.ClickTitleBar();
            loginLink = Host.Local.FindSingle<Ranorex.ATag>(loginLinkRxPath);
            loginLink.Click();
            Report.Log(ReportLevel.Info,browser2.CurrentUri);

            browser3.ClickTitleBar();
            loginLink = Host.Local.FindSingle<Ranorex.ATag>(loginLinkRxPath);
            loginLink.Click();
            Report.Log(ReportLevel.Info,browser3.CurrentUri);

            browser4.ClickTitleBar();
            loginLink = Host.Local.FindSingle<Ranorex.ATag>(loginLinkRxPath);
            loginLink.Click();
            Report.Log(ReportLevel.Info,browser4.CurrentUri);

            browser1.Navigate(uri);
            browser2.Navigate(uri);
            browser3.Navigate(uri);
            browser4.Navigate(uri);

            int total = 3;
            Browser[] browsers = new Browser[total];
            for (int i = 0; i <= total-1; i++)
            {
                browsers[i] = new Browser(BrowserProduct.IE, "lynda.com");
                browsers[i].HalfSize();
                browsers[i].HalfSize();
                browsers[i].Move((i+1) * 10, (i+1) * 10);
            }

            browsers[2].Fun();
        }