Ejemplo n.º 1
0
        public void GivenIHaveLaunchedTheEribankApp()
        {
            _extentReport.setupExtentReport("EriBankApp Test", "EriBankApp Test");
            test = _extentReport.createTest("Test");

            if (_CommonFunctions.IsAndroidElementVisible(AndriodDriverFactory.GetAndroidDriver(), By.XPath("//android.widget.EditText[@text='Username']")))
            {
                _extentReport.testStatusWithMsg("Pass", "EriBank app was launched successfully");
                _extentReport.flushReport();
            }

            else
            {
                _extentReport.testStatusWithMsg("Fail", "EriBank app test failed");
                _extentReport.flushReport();
                _extentReport.getScreenShotMobile(AndriodDriverFactory.GetAndroidDriver(), test);

                Assert.AreEqual("//android.widget.EditText[@text='Username']", "//android.widget.EditText[@text='Username']2");
            }
        }
Ejemplo n.º 2
0
        public void GivenILaunchTheEriBankApp()
        {
            _ExtentReport.setupExtentReport("EriBankApp Test", "EriBankApp Test");
            test = _ExtentReport.createTest("Test");

            if (_CommonFunctions.IsAndroidElementVisible(AndriodDriverFactory.GetAndroidDriver(), By.Id("com.experitest.ExperiBank:id/usernameTextField")))
            {
                _ExtentReport.testStatusWithMsg("Pass", "EriBank app was launched successfully");
                _ExtentReport.flushReport();
            }
            else
            {
                _ExtentReport.testStatusWithMsg("Fail", "EriBank app test failed");
                _ExtentReport.flushReport();
                _ExtentReport.getScreenShotMobile(AndriodDriverFactory.GetAndroidDriver(), test);

                Assert.AreEqual("//android.widget.EditText[@text='Username']", "//android.widget.EditText[@text='Username']2");
            }


            Console.WriteLine("App launched.................");
        }