Пример #1
0
        static void Main(string[] args)
        {
            MainPage    mainPage;
            ManCityPage mcp;

            IWebDriver webDriver = new ChromeDriver();

            webDriver.Manage().Window.Maximize();
            webDriver.Url = "http://shakarbhattarai.com.np/wordpress/";


            mainPage = new MainPage(webDriver);
            mainPage.click();
            webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            mcp = new ManCityPage(webDriver);
            mcp.submitComment(strAuthor: "Author Test", strEmail: "*****@*****.**", strUrl: "www.test.com", strComment: "test comment");
            mcp.clickSubmit();

            webDriver.Close();
        }
Пример #2
0
        public Program(string url) : base(url)
        {
            MainPage    mainPage;
            ManCityPage _manCityPage;

            var currentUrl = _webDriver.Url;

            mainPage = new MainPage(_webDriver);
            mainPage.clickOnManCityTitle();
            var differenturl = _webDriver.Url;

            VerifyOnClikcingSubmitPageRedirects(currentUrl, differenturl);
            _webDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            //SiteDriver.waitfor10seconds();

            _manCityPage = new ManCityPage(_webDriver);
            _manCityPage.setAuthor("Author Test");
            _manCityPage.setEmail("*****@*****.**");
            _manCityPage.setUrl("www.test.com");
            _manCityPage.setComment("test comment");
            _manCityPage.clickSubmit();

            _webDriver.Close();
        }