Beispiel #1
0
        //Modules
        public void login(String strAccount, String strUser, String strPwd)
        {
            //Object Repositories
            landingPage jobboxLandinPage = new landingPage();
            loginPage   jobboxLoginPage  = new loginPage();
            mainPage    jobboxMainPage   = new mainPage();

            Console.WriteLine("Starting Login Module\n" + "Account: " + strAccount + "\nUserName: "******"txtAccount"))))
            {
                pvAndroid.MobileTextField_EnterText(By.XPath(jobboxLandinPage.getXpath("txtAccount")), strAccount);
                pvAndroid.MobileButton_Click(By.XPath(jobboxLandinPage.getXpath("btnNext")));
            }

            pvAndroid.MobileTextField_EnterText(By.XPath(jobboxLoginPage.getXpath("txtUserName")), strUser);
            pvAndroid.MobileTextField_EnterText(By.XPath(jobboxLoginPage.getXpath("txtPwd")), strPwd);
            pvAndroid.MobileButton_Click(By.XPath(jobboxLoginPage.getXpath("btnLogin")));

            if (pvAndroid.MobileElement_Exists(By.XPath(jobboxMainPage.getXpath("btnInbox"))))
            {
                Console.WriteLine("User: "******" is able to log in to jobbox mobile App");
            }
            else
            {
                Console.WriteLine("An Error occurr while User: "******" trying to log in to jobbox mobile App");
            }
        }
Beispiel #2
0
        public ActionResult Add(landingPage landingPage)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    landingPageRepositiry.InsertData(landingPage);
                    landingPageRepositiry.Save();
                }
                catch (Exception ex)
                {
                    ViewBag.DangerMessage = "an error happened";
                    return(View("Add", landingPage));
                }

                ModelState.Clear();
                ViewBag.SuccessMessage = "you message was sent successfully";
            }
            return(View(landingPage));
        }
 public void InsertData(landingPage landingPage)
 {
     context.landingPages.Add(landingPage);
 }
Beispiel #4
0
        public ActionResult Add(int id = 0)
        {
            landingPage landingPage = new landingPage();

            return(View(landingPage));
        }