Example #1
0
        public void HandlePopUp()
        {
            var automationPage = new AutomationPage(this.driver);
            var homePage       = new ToolsQaHomePage(this.driver);

            automationPage.NavigateTo();
            automationPage.NewTabButton.Click();
            this.driver.SwitchTo().ActiveElement();

            // Check is logo has "src" attribute
            homePage.AssertToolsQaLogoSrcContains("/wp-content/uploads/2014/08/Toolsqa.jpg");

            // Close the first open tab
            automationPage.PageClose();

            // Check that the driver handles only one window (in ToolsQaHomePageAsserter.cs)
            driver.AssertNumberOfWindowsHandled(1); // Attention: There are two asserts in the method
        }