예제 #1
0
        public void OfficialRecordsSearchPage()
        {
            using (IWebDriver driver = new SelectDriver().Driver)
            {
                // arrange
                var homePage = new HomePage(driver);
                homePage.NavigateTo();

                // act
                homePage.OfficialRecordsSearchlink.Click();

                // assert
                var officialRecordsSearchPagePage = new PageObjectModels.OfficialRecordsSearchPage(driver);
                officialRecordsSearchPagePage.EnsurePageLoaded();
            }
        }
예제 #2
0
        public void CheckBoxTest()
        {
            using (IWebDriver driver = new SelectDriver().Driver)
            {
                // arrange
                var homePage = new HomePage(driver);
                homePage.NavigateTo();
                homePage.OfficialRecordsSearchlink.Click();
                var officialRecordsSearchPagePage = new PageObjectModels.OfficialRecordsSearchPage(driver);
                officialRecordsSearchPagePage.AdvanceSearchLink.Click();
                var advanceSearchPage = new AdvanceSearchPage(driver);
                // act

                // Code to check a box
                //Actions action = new Actions(driver);
                //action.MoveToElement(advanceSearchPage.AdvanceSearchCheckBox);
                //WebPageDelay.Pause(1000);
                IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
                js.ExecuteScript("arguments[0].scrollIntoView();", advanceSearchPage.AdvanceSearchCheckBox);
                advanceSearchPage.AdvanceSearchCheckBox.Click();

                // assert
            }
        }