示例#1
0
        public void FaleConoscoValido()
        {
            driver.Navigate().GoToUrl("http://automationpractice.com/index.php");

            HomeNaoLogadaPage homePage = new HomeNaoLogadaPage(driver);

            homePage.AcessarContactUs();

            ContactUsPage contactPage = new ContactUsPage(driver);

            //Forma Estruturada
            string textoRetornado =
                contactPage.PreencherComboAssunto("Customer service")
                .PreencherEmail("*****@*****.**")
                .PreencherNumeroPedido("12346579")
                .EnviarArquivoDeUpload(@"C:\Dev\teste.txt")
                .PreencherMensagem("Mensagem de Teste")
                .ClicarEnviar()
                .VerificarMensagemSucesso();

            //Forma Funcional
            //string textoRetornado =
            //contactPage.PreencherSolicitacao("Customer service", "*****@*****.**", "12346579", @"C:\Dev\teste.txt", "Mensagem de Teste")
            //           .VerificarMensagemSucesso();

            Assert.AreEqual("Your message has been successfully sent to our team.", textoRetornado);
        }
示例#2
0
        public ContactUsPage NavigateContactUs()
        {
            MenuPage      menuPagine    = new MenuPage(webDriver);
            ContactUsPage contactUsPage = menuPagine.ClickContactUs();

            return(contactUsPage);
        }
示例#3
0
        public void GivenSelectFromSubjectHeadeingDrop_Down(string p0)
        {
            // Utilities ut = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            ut.DropdownSelect(cup.SubjectHeadingDdwn, p0);
        }
示例#4
0
        public void FaleConoscoEmailInvalido()
        {
            driver.Navigate().GoToUrl("http://automationpractice.com/index.php");
            HomeNaoLogadaPage homePage = new HomeNaoLogadaPage(driver);

            homePage.AcessarContactUs();

            ContactUsPage contactPage = new ContactUsPage(driver);

            //Forma Estrurada
            string textoRetornado =
                contactPage.PreencherComboAssunto("Customer service")
                .PreencherEmail("emailinvalido")
                .PreencherNumeroPedido("12346579")
                .EnviarArquivoDeUpload(@"C:\Dev\teste.txt")
                .PreencherMensagem("Mensagem de Teste")
                .ClicarEnviar()
                .VerificarMensagemAlertaErro();

            //Forma Funcional
            //string textoRetornado =
            //contactPage.PreencherSolicitacao("Customer service", "emailinvalido", "12346579", @"C:\Dev\teste.txt", "Mensagem de Teste")
            //           .VerificarMensagemAlertaErro();

            Assert.AreEqual("There is 1 error Invalid email address.", textoRetornado);
        }
        public void TCID2()
        {
            var contactUsPage = new ContactUsPage(Driver);

            contactUsPage.GoTo();
            Assert.IsTrue(contactUsPage.IsLoaded);
        }
示例#6
0
        public void WhenUserClicksSendButton()
        {
            // Utilities ut = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            ut.ClickOnElement(cup.submitMessageBtn);
        }
示例#7
0
        public void ThenMessageIsPresentedToTheUser(string alertMsg)
        {
            Utilities     ut  = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            Assert.That(ut.ReturnTextFromElement(cup.successMessage), Is.EqualTo(alertMsg), "Message was not sent to customer service");
        }
示例#8
0
        public void WhenUserSubmitsTheForm()
        {
            Utilities     ut  = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            ut.ClickOnElement(cup.sendBtn);
        }
        public void contactUs()
        {
            var           test = extent.CreateTest("contactUs");
            ContactUsPage c1   = new ContactUsPage(this.driver);

            c1.getContactUs().Click();;

            test.Log(Status.Info, "Click on Contact Us");
            IWebElement fullname = c1.getFullName();

            fullname.SendKeys(ReadData.fnametxt);

            test.Log(Status.Info, "Insert Full Name");
            IWebElement message = c1.getMessage();

            test.Log(Status.Info, "Insert Message");
            message.SendKeys(ReadData.familynametxt);
            IWebElement email = c1.getEmail();

            email.SendKeys(Helpers.Helpers.generateEmail());
            test.Log(Status.Info, "Insert Email");
            IWebElement category = c1.getCategory();

            category.Click();
            test.Log(Status.Info, "Pick Category");

            c1.setCategory();
            test.Log(Status.Info, "Send");
            c1.getSend().Click();
            test.Log(Status.Pass, "Passed");
            extent.Flush();
        }
示例#10
0
        public ContactUsPage ClickContactUs()
        {
            contactUsButton.Click();
            ContactUsPage contactUsPage = new ContactUsPage();

            return(contactUsPage);
        }
        public ContactUsPage NavigateToContactUs()
        {
            MenuPage      menuPage      = new MenuPage();
            ContactUsPage contactUsPage = menuPage.ClickContactUs();

            return(contactUsPage);
        }
示例#12
0
 public BaseTest()
 {
     driver        = new ChromeDriver();
     header        = new Header(driver);
     mainPage      = new MainPage(driver);
     signInPage    = new SignInPage(driver);
     contactUsPage = new ContactUsPage(driver);
 }
示例#13
0
        public void TCID2()
        {
            var contactUsPage = new ContactUsPage(Driver);

            contactUsPage.GoTo();
            Assert.IsTrue(contactUsPage.IsLoaded,
                          "The contact us page did not open successfully.");
        }
示例#14
0
        public void TCID2()
        {
            ContactUsPage contactUsPg = new ContactUsPage(Driver);

            contactUsPg.GoTo();
            Assert.IsTrue(contactUsPg.IsLoaded,
                          "The Contact us page did not load successfully");
        }
示例#15
0
        public void GivenEntersDateIntoMandatoryFields()
        {
            //Utilities ut = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            ut.EnterTextInElement(cup.Email, ut.GenerateRandomEmail());
            ut.EnterTextInElement(cup.MessageBox, TestConstants.textMessage);
        }
示例#16
0
        public void ConfirmContactUsPage()
        {
            Thread.Sleep(3000);
            WindowHelper.SwitchToNewWindow(webDriver);
            ContactUsPage contactUsPage = new ContactUsPage(webDriver);

            ContactUsPage.Equals(By.TagName("h1"), "Contact us");
        }
示例#17
0
        public ContactUsPage ClickContactUs()
        {
            IWebElement contactUsButton = webDriver.FindElement(By.Id("contact-link"));

            contactUsButton.Click();
            ContactUsPage contactUsPage = new ContactUsPage(webDriver);

            return(contactUsPage);
        }
示例#18
0
        public void GivenFillsInAllRequiredFields(string heading, string message)
        {
            Utilities     ut  = new Utilities(Driver);
            ContactUsPage cup = new ContactUsPage(Driver);

            ut.DropdownSelect(cup.subjectHeading, heading);
            ut.EnterTextInElement(cup.contactEmail, ut.GenerateRandomEmail());
            ut.EnterTextInElement(cup.message, message);
        }
示例#19
0
        public void NavigateTo(string item)
        {
            Page page = new Page();

            menuPage.Menu.SelectedItem = item;

            switch (item)
            {
            case "Refer a contractor":
                page = new ContractorPage();
                break;

            case "My contractors":
                page = new MyContractorPage();

                break;

            case "Amend my details":
                page = new AmendDetailsPage();
                break;

            case "Terms and conditions":
                DependencyService.Get <FormSample.Helpers.Utility.IUrlService> ().OpenUrl(Utility.PDFURL);
                page = new HomePage();
                menuPage.Menu.SelectedItem = "Home";
                break;

            case "About us":
                page = new AboutusPage();
                break;

            case "Contact us":
                page = new ContactUsPage();
                break;

            case "Take home pay calculator":
                page = new CalculatorPage();
                break;

            case "Weekly pay chart":
                page = new ChartPage();
                break;

//			case "Log out":
//				Settings.GeneralSettings = string.Empty;
//				App.Logout ();
//				break;
            default:
                //menuPage.Menu.SelectedItem = item;
                page = new HomePage();
                break;
            }
            this.Detail      = new NavigationPage(page);
            this.IsPresented = false;
            isFirstTime      = false;
        }
示例#20
0
        public void ContactUsFormIsSentCorrectly()
        {
            ContactUsPage contactUsPage = navigationSteps.NavigateContactUs();

            contactUsPage.FillContactUsForm(ContactUsPage.Options.ByText, "Customer service", "*****@*****.**", "1234", @"D:\prueba\FilePlano.txt", "my message");
            string actualMessage   = contactUsPage.GetConfirmationMessage();
            string expectedMessage = "Your message has been successfully sent to our team.";

            Assert.AreEqual(expectedMessage, actualMessage);
        }
示例#21
0
        public void ClickContactUsLinkLoadsContactUsPage()
        {
            FooterComponent footer = new FooterComponent(driver);

            footer.ClickContactUsLink();

            ContactUsPage contactUsPage = new ContactUsPage(driver);

            Assert.AreEqual(contactUsPage.GetPageHeaderText(), "Contact us");
        }
示例#22
0
 public void Create()
 {
     if (_Driver == null)
     {
         _Driver        = new WebDriverFactory().CreateDriver(_browser);
         _homePage      = new HomePage(_Driver);
         _CommonActions = new CommonActions(_Driver);
         _ContactUsPage = new ContactUsPage(_Driver);
         _SignInPage    = new SignInPage(_Driver);
     }
 }
示例#23
0
        public void CheckInvalidFormEnquiryEmpty()
        {
            ContactUsPage contactUs = new ContactUsPage(browser);

            contactUs.ClickLinkContactUs();
            contactUs.ContactUsSubmitInvalidEnquiryEmpty();

            var alertMsgForms = contactUs.AlertMsgForms.Text;

            Assert.AreEqual(alertMsgForms, "Enquiry must be between 10 and 3000 characters!");
        }
示例#24
0
        public void CheckInvalidFormEmail()
        {
            ContactUsPage contactUs = new ContactUsPage(browser);

            contactUs.ClickLinkContactUs();
            contactUs.ContactUsSubmitInvalidEmail();

            var alertMsgForms = contactUs.AlertMsgForms.Text;

            Assert.AreEqual(alertMsgForms, "E-Mail Address does not appear to be valid!");
        }
示例#25
0
        public void CheckValidFormContactUs()
        {
            ContactUsPage contactUs = new ContactUsPage(browser);

            contactUs.ClickLinkContactUs();
            contactUs.ContactUsSubmitValidForm();

            var footerTitlePageNoContent = contactUs.FooterTitlePageNoContent.Text;

            Assert.AreEqual(footerTitlePageNoContent, "Contact Us");
        }
        [TestMethod] //Donde hacemos el paso a paso que está indicado en el testcase
        public void ContactUs()
        {
            HomePage      homePage      = new HomePage(driver);
            ContactUsPage contactUsPage = new ContactUsPage(driver);

            homePage.GoToPage();
            homePage.ClickOnContactLink();

            contactUsPage.Fillform("*****@*****.**", "1012252", "this is a test for automation");
            Assert.AreEqual("Your message has been successfully sent to our team.", contactUsPage.GetSuccessMsg());
        }
示例#27
0
        public void CheckInvalidFormName()
        {
            ContactUsPage contactUs = new ContactUsPage(browser);

            contactUs.ClickLinkContactUs();
            contactUs.ContactUsSubmitInvalidName();

            var alertMsgForms = contactUs.AlertMsgForms.Text;

            Assert.AreEqual(alertMsgForms, "Name must be between 3 and 32 characters!");
        }
示例#28
0
        public void ContactUsTest()
        {
            HomePage      homePage      = new HomePage(driver, wait);
            ContactUsPage contactUsPage = new ContactUsPage(driver);

            homePage.GoToScreen();
            homePage.ClickContactUs();

            contactUsPage.Fillform("*****@*****.**", "1012252", "this is a test for automation");
            Assert.AreEqual("Your message has been successfully sent to our team.", contactUsPage.GetSuccessMsg());
        }
示例#29
0
        public ActionResult ContactUs(ContactUsPage model)
        {
            var cp = db.ContactUsPage.FirstOrDefault();

            cp.Title           = model.Title;
            cp.Content         = model.Content;
            cp.UpdateTime      = DateTime.Now;
            db.Entry(cp).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public static string Run()
        {
            NavigateToSite();
            var CurrentPage1 = new HomePage().GetInstance3 <HomePage>();

            CurrentPage1.As <HomePage>().ClickContactUsbutton();

            var CurrentPage2 = new ContactUsPage().GetInstance3 <ContactUsPage>();

            CurrentPage2.As <ContactUsPage>().FillContactUsForm("Customer service", "*****@*****.**", "123", @"C:\Test.txt", "message 123");

            return(CurrentPage2.As <ContactUsPage>().getConfirmationMessageText());
        }