Ejemplo n.º 1
0
        public void ValidateFormPage()
        {
            CustomLogs.startTestCase(System.Reflection.MethodBase.GetCurrentMethod().Name);

            try
            {
                HomePage homePage = HomePage;
                FormPage formPage = homePage.ClickOnFormBtn();
                Assert.IsTrue(formPage.CheckIfPageIsDisplayed());
            }
            catch (AssertFailedException afe)
            {
                CustomLogs.warn(afe.Message);
                throw new AssertFailedException(afe.Message);
            }
            catch (NoSuchElementException nsee)
            {
                CustomLogs.error(nsee.Message);
                throw new NoSuchElementException(nsee.Message);
            }
            catch (Exception exc)
            {
                CustomLogs.error(exc.Message + exc.StackTrace);
                throw new Exception(exc.Message);
            }
            finally
            {
                CustomLogs.endTestCase(System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }