コード例 #1
0
        public void WhenISubmitFormWithNames()
        {
            formPage = homePage.OpenFormPage();

            foreach (string name in names)
            {
                helloPage = formPage.SubmitForm(name);
                helloPageResults.Add(helloPage.GetResultText());
                formPage = helloPage.ReturnToFormPage();
            }
            formPage.driver.Close();
        }
コード例 #2
0
        public void CheckHelloPage()
        {
            CustomLogs.startTestCase(System.Reflection.MethodBase.GetCurrentMethod().Name);

            try
            {
                HomePage homePage = HomePage;
                FormPage formPage = homePage.ClickOnFormBtn();

                foreach (string name in nameList)
                {
                    HelloPage hello = formPage.SetUpInputValueAndClickGo(name);
                    hello.checkIfCompanyLogoIsDisplayed();
                    hello.ReturnToFormPage();
                }
            }
            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);
            }
        }
コード例 #3
0
 public void WhenIPressGoButton()
 {
     helloPage = formPage.Submit();
 }