public void Setup()
        {
            cmnDriver = new CommonDriver("chrome");

            cmnDriver.NavigateToUrl(url: url);

            loginPage = new LoginPage(cmnDriver.Driver);
        }
Exemplo n.º 2
0
        public void SetUp()
        {
            extentReportUtils.createTestCase("SetUp");
            commonDriver = new CommonDriver(_configuration["browserType"]);
            extentReportUtils.addTestLog(Status.Info, "Browser Type is" + _configuration["browserType"]);

            commonDriver.NavigateToUrl(_configuration["baseUrl"]);
            extentReportUtils.addTestLog(Status.Info, "Navigation to BaseURL" + _configuration["baseUrl"]);
            _actions = new CommonActions();
        }
Exemplo n.º 3
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        /// <remarks>
        /// モデルの初期化と、タイマの初期化を行う
        /// </remarks>
        /// <param name="driver"></param>
        public MonitorViewModel(CommonDriver.Model.IDriverModel driver)
        {
            _model = Model.MonitorModel.Instance;
            _model.PropertyChanged += ModelPropertyChanged;
            _database.PropertyChanged += DataBasePropertyChanged;

            _dispatcherTimer = new DispatcherTimer(DispatcherPriority.Normal);
            _dispatcherTimer.Interval = new TimeSpan(0, 0, 5);
            _dispatcherTimer.Tick += new EventHandler(DispatcherTimer_Tick);
        }
Exemplo n.º 4
0
        public void FinalValidation(IWebDriver driver)
        {
            var status       = TestContext.CurrentContext.Result.Outcome.Status;
            var stackTrace   = "<pre>" + TestContext.CurrentContext.Result.StackTrace + "</pre>";
            var errorMessage = TestContext.CurrentContext.Result.Message;

            if (status == TestStatus.Failed)
            {
                _test.Log(Status.Fail, errorMessage + ProfilePage.NotificationText);
                _test.Log(Status.Fail, "Snapshot below: " + CommonDriver.SaveScreenshot(driver, "Share Skill Failed"));
            }
        }
Exemplo n.º 5
0
        public void Setup()
        {
            extentReportUtils.createATestCase("Setup");
            string browserType = configuration["browserType"];

            url = configuration["baseUrl"];

            extentReportUtils.addTestLog(Status.Info, "Browser Type - " + browserType);
            extentReportUtils.addTestLog(Status.Info, "Base Url - " + url);

            CmdDriver = new CommonDriver(browserType);
            CmdDriver.NavigateTo(url);

            screenshot = new ScreenshotUtils(CmdDriver.Driver);
        }
Exemplo n.º 6
0
        public void SetUp()
        {
            string browserType = ConfigurationManager.AppSettings["browserType"];

            cmnDriver = new CommonDriver(browserType);

            cmnDriver.PageLoadTimeout         = Int32.Parse(ConfigurationManager.AppSettings["pageLoadTimeout"]);
            cmnDriver.ElementDetectionTimeout = Int32.Parse(ConfigurationManager.AppSettings["elementDetectionTimeout"]);

            screenshotControl = new ScreenshotControl(cmnDriver.Driver);

            extentReport.AddTestLog(Status.Info, "Initializing all web pages");

            amazonHomePage = new AmazonHomePage(cmnDriver.Driver);
        }
        public void SetUp()
        {
            extentReport.CreateATestCase("Setup");

            string browserType = _configuration["browserType"];

            extentReport.AddTestLog(Status.Info, "Browsertype - " + browserType);

            cmnDriver = new CommonDriver(browserType);

            string baseUrl = _configuration["baseUrl"];;

            cmnDriver.navigateToFirstUrl(baseUrl);

            driver = cmnDriver.Driver;

            loginPage = new Guru99LoginPage(driver);

            screenshotUtils = new ScreenshotUtils(driver);
        }