Inheritance: ContentPage
        private async void Initialize()
        {
            // Define a challenge handler method for the AuthenticationManager 
            // (this method handles getting credentials when a secured resource is encountered)
            AuthenticationManager.Current.ChallengeHandler = new ChallengeHandler(CreateCredentialAsync);

            // Create the public layer and provide a name
            var publicLayer = new ArcGISTiledLayer(new Uri(PublicMapServiceUrl));
            publicLayer.Name = PublicLayerName;             

            // Create the secured layer and provide a name
            var tokenSecuredLayer = new ArcGISMapImageLayer(new Uri(SecureMapServiceUrl));
            tokenSecuredLayer.Name = SecureLayerName;

            // Bind the layer to UI controls to show the load status
            PublicLayerStatusPanel.BindingContext = publicLayer;
            SecureLayerStatusPanel.BindingContext = tokenSecuredLayer;
            
            // Create a new map and add the layers
            var myMap = new Map();
            myMap.OperationalLayers.Add(publicLayer);
            myMap.OperationalLayers.Add(tokenSecuredLayer);

            // Add the map to the map view
            MyMapView.Map = myMap;

            // Create the login UI (will display when the user accesses a secured resource)
            _loginPage = new LoginPage();

            // Set up event handlers for when the user completes the login entry or cancels
            _loginPage.OnLoginInfoEntered += LoginInfoEntered;
            _loginPage.OnCanceled += LoginCanceled;
        }
 public void providing_incorrect_credentials_returns_error_message()
 {
     LoginPage login = new LoginPage(browser);
     string expected = "Invalid username or password";
     string actual = login.LogonAsExpectingErrorMessage("foo", "bar");
     Assert.AreEqual(expected, actual);
 }
        public LoginWithInvalidDetails(ITestOutputHelper output, IISExpress issexpress)
            : base(output, issexpress)
        {
            loginPage = new LoginPage(driver);
            loginPage.Browse();

            loginPage.EmailAddress = "*****@*****.**";
            loginPage.Password = "******";
        }
 public void providing_correct_creds_takes_user_to_home_page()
 {
     LoginPage login = new LoginPage(browser);
     PageFactory.InitElements(browser, login);
     HomePage home = login.LogonAs("testuser", "abc123");
     PageFactory.InitElements(browser, home);
     Assert.AreEqual("Logout", home.LogoutLink.Text);
     string targetUrl = home.LogoutLink.GetAttribute("href");
     Assert.IsTrue(targetUrl.EndsWith("/logout"));
 }
示例#5
0
文件: App.cs 项目: phaufe/MvvmNano
        private void SetUpMainPage()
        {
            var viewModel = MvvmNanoIoC.Resolve<LoginViewModel>();
            viewModel.Initialize();

            var page = new LoginPage();
            page.SetViewModel(viewModel);

            MainPage = new MvvmNanoNavigationPage(page);
        }
示例#6
0
        public Login(ITestOutputHelper output, IISExpress issexpress)
            : base(output, issexpress)
        {
            loginPage = new LoginPage(driver);
            loginPage.Browse();

            loginPage.EmailAddress = "*****@*****.**";
            loginPage.Password = "******";

            indexPage = new IndexPage(driver);
        }
示例#7
0
 public void LogInToMailboxUsingSingleton()
 {
     IWebDriver driver = WebDriverSingleton.GetInstance();
     driver.Navigate().GoToUrl("https://mail.ru/");
     LoginPage lp = new LoginPage(driver);
     lp.SetUserNamePassword();
     MainPage mp = lp.ClickLoginButton();
     Assert.IsTrue(mp.loginEmail.Text.ToLower().Equals(lp.Email));
     mp.LogOut();
     WebDriverSingleton.CloseDriver();
 }
示例#8
0
        public StartPage()
        {
            RenderContent();

            btnGoogleLogIn.Clicked += (sender, args) =>
                {
                    // IssueReport sends us to the IssueReport page.
                    var loginPage = new LoginPage ();
                    Navigation.PushModalAsync (loginPage);
                };
        }
示例#9
0
 public void LogInToMailboxUsingFactory()
 {
     WebDriverCreator creator = new ChromeDriverCreator();
     IWebDriver driver = creator.FactoryMethod();
     driver.Navigate().GoToUrl("https://mail.ru/");
     LoginPage lp = new LoginPage(driver);
     lp.SetUserNamePassword();
     MainPage mp = lp.ClickLoginButton();
     Assert.IsTrue(mp.loginEmail.Text.ToLower().Equals(lp.Email));
     mp.LogOut();
     driver.Quit();
 }
示例#10
0
 public MailBoxPage LoginToGmail(LoginPage page, string login, string pass)
 {
     Console.WriteLine("Log in to gmail...");
     if (page.BackArrow.Displayed)
         page.BackArrow.Click();
     page.LoginField.SendKeys(login);
     page.NextButton.Click();
     page.PassField.SendKeys(pass);
     page.SingInButton.Submit();
     Thread.Sleep(3000);
     return new MailBoxPage();
 }
示例#11
0
 public void LogInToMailboxUsingFactory()
 {
     driver = new ChromeDriver(driverPath);
     driver.Manage().Window.Maximize();
     IWebDriver decorDriver = new Decorator(driver);
     decorDriver.Navigate().GoToUrl("https://mail.ru/");
     LoginPage lp = new LoginPage(decorDriver);
     lp.SetUserNamePassword();
     MainPage mp = lp.ClickLoginButton();
     Assert.IsTrue(mp.loginEmail.Text.ToLower().Equals(lp.Email));
     mp.LogOut();
     driver.Quit();
 }
示例#12
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Forms.Init();

            window = new UIWindow(UIScreen.MainScreen.Bounds);

            var loginPage = new LoginPage();

            window.RootViewController = loginPage.CreateViewController();
            window.MakeKeyAndVisible();

            return true;
        }
示例#13
0
 public App()
 {
     //		MainPage = new RootPage ();
     // The root page of your application
     MainPage = new LoginPage ();
     //			MainPage = new NavigationPage(new AcceptPaymentView());
     //
     //			MasterDetailPage = new MasterDetailPage {
     //				Master = new MenuPage(),
     //			Detail = new NavigationPage(new GridAcceptPayPage()),
     //			};
     //			MainPage = MasterDetailPage;
 }
示例#14
0
        public void MainGmailTest()
        {
            LoginPage page = new LoginPage();
            MailBoxPage page2 = page.LoginToGmail(Username, Userpass);
            Assert.That(driver.Url.Equals("https://mail.google.com/mail/#inbox"), "Log in failed");

            string to = Username+"@gmail.com";
            string subj = "Test subject " + Random;
            string body = "Test mail body text: " + Random;
            page2.CreateNewMail(to, subj, body);
            page2.CheckDraft(to, subj, body);
            page2.SendMailAndCheck(subj);
            page2.LogOut();
        }
示例#15
0
 public void Test3_SendMessage()
 {
     LoginPage lp = new LoginPage(_driver);
     lp.SetUserNamePassword();
     MainPage mp = lp.ClickLoginButton();
     mp.NavigateToDraft();
     NewMessagePage nmp = mp.SelectMessageFromDraft();
     nmp.SendMessage();
     nmp.NavigateToDraft();
     Assert.IsFalse(Verifier.VerifyMessageExistInFolder(By.XPath(mp.messageXpath), "Message not exist in Draft folder"));
     mp.NavigateToSent();
     Assert.IsTrue(Verifier.VerifyMessageExistInFolder(By.XPath(mp.messageXpath), "Message not exist in Sent folder"));
     mp.LogOut();
 }
示例#16
0
 public void Test1_LogInToMailbox()
 {
     XmlConfigurator.Configure();
     Logger.Debug("Started Test1");
     LoginPage lp = new LoginPage(_driver);
     Logger.Info("Open LoginPage");
     lp.SetUserNamePassword();
     Logger.Warn("Enetr username and password...");
     MainPage mp = lp.ClickLoginButton();
     Assert.IsTrue(mp.loginEmail.Text.ToLower().Equals(lp.Email));
     Logger.Error("Assert passed");
     Utils.HighlightElement(mp.loginEmail);
     mp.LogOut();
     Logger.Fatal("Test finished!");
 }
示例#17
0
        public OAuthToken GetAccessToken()
        {
            var oauth = new OAuth();

            var requestToken = oauth.GetRequestToken(new Uri(DropboxRestApi.BaseUri), DropboxProperties.consumerKey, DropboxProperties.consumerSecret);
            DropboxProperties.Properties.oauthToken = requestToken.Token;
            DropboxProperties.Properties.oauthTokenSecret = requestToken.Secret;

            var authorizeUri = oauth.GetAuthorizeUri(new Uri(DropboxRestApi.AuthorizeBaseUri), requestToken);

            LoginPage.Site = StorageServices.Dropbox;
            LoginPage.SigningIn = true;

            LoginPage window = new LoginPage();
            window.ShowDialog();

            return oauth.GetAccessToken(new Uri(DropboxRestApi.BaseUri), DropboxProperties.consumerKey, DropboxProperties.consumerSecret, requestToken);
        }
示例#18
0
        public Logout(ITestOutputHelper output, IISExpress issexpress)
            : base(output, issexpress)
        {
            //driver.Url = "http://*****:*****@aspnetboilerplate.com";
            loginPage.Password = "******";

            loginPage.Login();
            
            WaitForUrlChange(driver.Url);
            WaitForReady();
            // check redirected to index
        }
示例#19
0
 public void Test2_CreateNewMessageAndSave()
 {
     XmlConfigurator.Configure();
     Logger.Debug("Started Test2");
     LoginPage lp = new LoginPage(_driver);
     Logger.Info("Open LoginPage");
     lp.SetUserNamePassword();
     Logger.Warn("Enetr username and password...");
     MainPage mp = lp.ClickLoginButton();
     Logger.Info("Login to Mailbox");
     NewMessagePage nmp = mp.CreateNewMessage();
     Logger.Info("Create New Message");
     nmp.FillTextFields();
     Logger.Info("Fill the fields");
     nmp.SaveAsDraft();
     Logger.Info("Save as Draft");
     nmp.NavigateToDraft();
     Logger.Info("Check Draft folder");
     Assert.IsTrue(_driver.FindElement(By.XPath(mp.messageXpath)).Displayed);
     Logger.Error("Assert passed");
     mp.LogOut();
 }
示例#20
0
        public App()
        {
            InitializeComponent();

            CheckoutItems = new ObservableCollection<Food>();

            var azureServiceClient = DependencyService.Get<IAzureClient>();
            azureServiceClient.Init();
            Client = azureServiceClient.MobileService;

            var screen = DependencyService.Get<IScreenSize>();
            if (screen != null)
            {
                ScreenSize = screen.GetScreenSize();
            }
            else {
                ScreenSize = new Size(300, 600);
            }

            if (string.IsNullOrEmpty(Settings.CurrentUser))
            {
                MainPage = new LoginPage();
                return;
            }



            var user = new MobileServiceUser(Settings.CurrentUser)
            {
                MobileServiceAuthenticationToken = Settings.AccessToken
            };

            Client.CurrentUser = user;

            InitializeHomePage();


        }
示例#21
0
 public void Init()
 {
     Driver.Initialize();
     LoginPage.GoTo();
     LoginPage.LoginAs("[email protected]").WithPassword("Gilligan5").Login();
 }
 public LoginController(ScenarioContext scenarioContext) : base(scenarioContext)
 {
     loginPage            = new LoginPage();
     _driver              = scenarioContext["WEB_DRIVER"] as IWebDriver;
     this.scenarioContext = scenarioContext;
 }
        public void Login()
        {
            var loginPage = new LoginPage(webDriver);

            loginPage.Login("admin", "admin");
        }
示例#24
0
 public void EditTestsInitialize()
 {
     LoginPage.GoTo();
     LoginPage.LoginAs(TestData.SubscribedStudent1);
 }
 private void SetupPages()
 {
     _loginPage        = new LoginPage(_driver);
     _examinationsPage = new ExaminationsPage(_driver);
     _patientsHomePage = new PatientsHomePage(_driver);
 }
示例#26
0
 public NavigateMessage(LoginPage navigateTo)
 {
     NavigateTo = navigateTo;
 }
        public App()
        {
            InitializeComponent();

            MainPage = new LoginPage();
        }
示例#28
0
 public LoginSteps()
 {
     loginPage = new LoginPage()
 }
示例#29
0
        public void CreateSemester()
        {
            ///Test name
            testScriptName = "CreateSemester";

            try
            {
                // Start debug viewer for writting application logs
                applicationLog = new ApplicationLog(configFilesLocation, reportFileDirectory, testScriptName);
                applicationLog.StartDebugViewer();

                // Prepare test data file path
                string testDataFilePath = PrepareTestDataFilePath(testScriptName);
                string testDataDirectoryPath = PrepareTestDataDirectory(testScriptName);

                // Test Data
                TestData testData = new TestData(testDataFilePath);
                string schooltechUName = (string)testData.TestDataTable["schooltechUName"];
                string schooltechPassword = (string)testData.TestDataTable["schooltechPassword"];

                string semesterTitle = (string)testData.TestDataTable["semesterTitle"];
                string semesterYear = (string)testData.TestDataTable["semesterYear"];
                string semesterDescription = (string)testData.TestDataTable["semesterDescription"];
                string schoolYear = (string)testData.TestDataTable["schoolYear"];
                string startDate = (string)testData.TestDataTable["startDate"];
                string endDate = (string)testData.TestDataTable["endDate"];

                // Create browser instace
                browser = BrowserFactory.Instance.GetBrowser(browserId, testScriptName, configFilesLocation, driverPath);
                LoginPage loginPage = new LoginPage(browser);

                // Log in as Schooltech
                SchoolTechHomePage s_Homepage = loginPage.LoginAsSchoolTech(schooltechUName, schooltechPassword, base.applicationURL);
                Assert.IsNotNull(s_Homepage, "Failed to login to InPods application as Schooltech");
                WriteLogs(testScriptName, stepNo, "Login to InPods Application as Schooltech", "Pass", browser);
                stepNo++;

                // Navigate to schooltech admin
                SchoolTechAdminPage admin = s_Homepage.GoToSchooltechAdmin();
                Assert.IsNotNull(admin, "Failed to navigate to Schooltech Admin Page");
                WriteLogs(testScriptName, stepNo, "Navigate to Schooltech Admin Page", "Pass", browser);
                stepNo++;

                // Navigate to Course Management page
                SchoolTechCourseManagementPage manage = admin.GotoCourseManagementPage();
                Assert.IsNotNull(manage, "Failed to navigate to Manage Course Page");
                WriteLogs(testScriptName, stepNo, "Navigate to Manage Course Page", "Pass", browser);
                stepNo++;

                // Navigate to create Semester page
                CreateSemesterPage semester = manage.GoToCreateSemesterPage();
                Assert.IsNotNull(manage, "Failed to navigate to Create Semester Page");
                WriteLogs(testScriptName, stepNo, "Navigate to Create Semester Page", "Pass", browser);
                stepNo++;

                // Create new semester
                Assert.IsTrue(semester.CreateNewSemester(semesterTitle, semesterYear, semesterDescription, schoolYear, startDate, endDate), "Unable to create new semester");
                WriteLogs(testScriptName, stepNo, "Create new semester " + semesterTitle, "Pass", browser);
                stepNo++;

                // Log out
                Assert.IsTrue(manage.LogOut(), "Failed to Log out");
                WriteLogs(testScriptName, stepNo, "LogOff", "Pass", browser);
            }
            catch (Exception exception)
            {
                WriteLogs(testScriptName, stepNo, exception.Message.ToString() + "And Exception Occured in \"" + testScriptName + "\" Test case", "FAIL", browser);
                Assert.Fail();
            }
            finally
            {
                /// Close Debug viewer and verify log file
                applicationLog.StopDebugViewer();
                bool isExceptionFound = applicationLog.VerifyDebugLogFiles(reportFileDirectory, testScriptName);
                if (!isExceptionFound)
                {
                    WriteLogs(testScriptName, stepNo, "Exception/error found in log file", "INFO", browser);
                }
            }
        }
示例#30
0
 public CreateAccountRequestListener(CreateAccountViewModel createAccountViewModel, LoginPage loginPage)
 {
     _createAccountViewModel = createAccountViewModel;
     _loginPage = loginPage;
 }
示例#31
0
 public void GivenIAmOnTheLoginPage()
 {
     loginPage = (new CommonSteps(Driver))
                 .BrowseToLoginPage();
 }
示例#32
0
 public LoginSteps(IWebDriver webDriver)
 {
     driver    = webDriver;
     LoginPage = new LoginPage(driver);
 }
 protected override void OnElementChanged(VisualElementChangedEventArgs e)
 {
     base.OnElementChanged(e);
     page = e.NewElement as LoginPage;
 }
示例#34
0
        public void Export02_UploadPDFPath_PAIDHistory_CSVExport()
        {
            HomePage HomePg = new HomePage(WebDriver);

            try
            {
                //###Login to biller account
                WebDriver.Manage().Window.Maximize();
                WebDriver.Navigate().GoToUrl("https://demo.billzy.com/home");
                LoginPage       loginPage  = new LoginPage(WebDriver);
                SendPage        SendPg     = new SendPage(WebDriver);
                ReceivedPage    Recpg      = new ReceivedPage(WebDriver);
                ExportModalPage ExportMlPg = new ExportModalPage(WebDriver);

                loginPage.UserNameTextBox().Click();
                loginPage.UserNameTextBox().SendKeys("*****@*****.**");
                loginPage.PasswordTextBox().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                loginPage.PasswordTextBox().SendKeys("Cognito1");

                loginPage.LoginButton().Click();
                SeleniumSetMethods SetMethods = new SeleniumSetMethods(WebDriver);
                SeleniumSetMethods.WaitOnPage(secdelay8);
                SendPg.SentBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay4);
                //testInfo = 'Export Modal for Sent - History - Billzy Export CSV'
                SendPg.SentHistoryBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay4);
                SendPg.SearchInvoiceSent().SendKeys("Upload_PDF_P");
                SeleniumSetMethods.WaitOnPage(secdelay4);
                SendPg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                SendPg.BillzyExport().Click();
                SeleniumSetMethods.WaitOnPage(secdelay8);

                string ExportModalTitle = ExportMlPg.ExportModalTitle().Text;
                string ExportMessage    = ExportMlPg.ExportMessage().Text;
                bool   icon             = ExportMlPg.ExportDownloadIcon().Displayed;
                string hyperlink        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(ExportModalTitle.Contains("Export") && ExportMessage.Contains("Your download should start automatically. ") && icon == true && hyperlink.Contains("here"));
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink     = exportlink.Substring(exportlink.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename = CSVLink.Substring(0, CSVLink.LastIndexOf(".") + 1);
                string text        = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename + "csv");
                SeleniumSetMethods.WaitOnPage(secdelay5);
                Assert.IsTrue(text.Contains("Status,To,Invoice Number,Completed,Amount,Billzy Column\nPAID,External Payer,Upload_PDF_P-09,2018-10-17,900.00,Cash requested\nPAID,External Payer,Upload_PDF_P-10,2018-10-17,1000.00,\nPAID,billzyBiz-415339,Upload_PDF_P-06,2018-10-17,600.00,\nPAID,billzyBiz-415339,Upload_PDF_P-07,2018-10-17,690.00,Paid 1902 day(s) earlier\nPAID,billzyBiz-415339,Upload_PDF_P-08,2018-10-17,800.00,Cash requested"));
                Assert.IsTrue(text.Contains("Upload_PDF_P-09") && text.Contains("Upload_PDF_P-06") && text.Contains("Upload_PDF_P-07") && text.Contains("Upload_PDF_P-08") && text.Contains("Upload_PDF_P-10"));

                //testInfo = 'Export Modal for Sent - History - MYOB CSV'
                SendPg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                SendPg.MYOB().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                ExportMlPg.AccountNumber().SendKeys("031982");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.NextBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                string ExportModalTitle1 = ExportMlPg.ExportModalTitle().Text;
                string ExportMessage1    = ExportMlPg.ExportMessage().Text;
                bool   icon1             = ExportMlPg.ExportDownloadIcon().Displayed;
                string hyperlink1        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(ExportModalTitle1.Contains("Export") && ExportMessage1.Contains("Your download should start automatically. ") && icon1 == true && hyperlink1.Contains("here"));
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink1 = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink1     = exportlink1.Substring(exportlink1.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename1 = CSVLink1.Substring(0, CSVLink1.LastIndexOf(".") + 1);
                string MYOBText     = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename1 + "txt");
                Assert.IsTrue(MYOBText.Contains("Co./Last Name,Invoice #,Date,Description,Account Number,Amount,Tax Code,Tax Amount,Sale Status,Terms - Payment is Due,           - Balance Due Days,Amount Paid,Inc-Tax Amount\nExternal Payer,10214799,18/10/2018,,031982,818.18,GST,81.82,I,2,14,900.00,900.00\n\n\nExternal Payer,10214807,18/10/2018,,031982,909.09,GST,90.91,I,2,14,1000.00,1000.00\n\n\nbillzyBiz-415339,10214765,18/10/2018,,031982,545.45,GST,54.55,I,2,14,600.00,600.00\n\n\nbillzyBiz-415339,10214773,18/10/2018,,031982,636.36,GST,63.64,I,2,14,700.00,700.00\n\n\nbillzyBiz-415339,10214781,18/10/2018,,031982,727.27,GST,72.73,I,2,14,800.00,800.00\n\n"));
                Assert.IsTrue(MYOBText.Contains("10214799") && MYOBText.Contains("10214807") && MYOBText.Contains("10214765") && MYOBText.Contains("10214773") && MYOBText.Contains("10214781"));


                //testInfo = 'Export Modal for Sent - History - XERO CSV'

                SendPg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                SendPg.XERO().Click();


                SeleniumSetMethods.WaitOnPage(secdelay5);
                string ExportModalTitle2 = ExportMlPg.ExportModalTitle().Text;
                string ExportMessage2    = ExportMlPg.ExportMessage().Text;
                bool   icon2             = ExportMlPg.ExportDownloadIcon().Displayed;
                string hyperlink2        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(ExportModalTitle2.Contains("Export") && ExportMessage2.Contains("Your download should start automatically. ") && icon2 == true && hyperlink2.Contains("here"));
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink2 = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink2     = exportlink2.Substring(exportlink2.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename2 = CSVLink2.Substring(0, CSVLink2.LastIndexOf(".") + 1);

                string XEROText = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename2 + "csv");
                Assert.IsTrue(XEROText.Contains("ContactName,EmailAddress,POAddressLine1,POCity,POPostalCode,POCountry,InvoiceNumber,Reference,InvoiceDate,DueDate,Description,Quantity,UnitAmount,AccountCode,TaxType,TaxAmount\nExternal Payer,null"));
                Assert.IsTrue(XEROText.Contains("INV10214799,Upload_PDF_P-09,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,900.00,,GST,0.00\nExternal Payer,null,,,,,INV10214807,Upload_PDF_P-10,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,1000.00,,GST,0.00\nbillzyBiz-415339,[email protected],415339 Testing St.,Brisbane,4000,AU,INV10214765,Upload_PDF_P-06,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,600.00,,GST,0.00\nbillzyBiz-415339,[email protected],415339 Testing St.,Brisbane,4000,AU,INV10214773,Upload_PDF_P-07,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,700.00,,GST,0.00\nbillzyBiz-415339,[email protected],415339 Testing St.,Brisbane,4000,AU,INV10214781,Upload_PDF_P-08,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,800.00,,GST,0.00"));


                SeleniumSetMethods.WaitOnPage(secdelay2);
                HomePg.SignOutBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                loginPage.UserNameTextBox().Click();

                SeleniumSetMethods.WaitOnPage(secdelay2);
                loginPage.UserNameTextBox().SendKeys("*****@*****.**");
                loginPage.PasswordTextBox().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                loginPage.PasswordTextBox().SendKeys("Cognito1");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                loginPage.LoginButton().Click();
                SeleniumSetMethods.WaitOnPage(secdelay4);
                HomePg.ReceivedBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                Recpg.ReceivedHistoryBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                Recpg.SearchInvoiceReceived().SendKeys("Upload_PDF_P");
                SeleniumSetMethods.WaitOnPage(secdelay3);
                SeleniumSetMethods.WaitOnPage(secdelay4);
                //testInfo = 'Export Modal for Received - History - Billzy Export CSV'
                Recpg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Recpg.BillzyExport().Click();
                SeleniumSetMethods.WaitOnPage(secdelay7);

                string rExportModalTitle = ExportMlPg.ExportModalTitle().Text;
                string rExportMessage    = ExportMlPg.ExportMessage().Text;
                bool   ricon             = ExportMlPg.ExportDownloadIcon().Displayed;
                string rhyperlink        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(rExportModalTitle.Contains("Export") && rExportMessage.Contains("Your download should start automatically. ") && ricon == true && rhyperlink.Contains("here"));
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink3 = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink3     = exportlink3.Substring(exportlink3.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename3 = CSVLink3.Substring(0, CSVLink3.LastIndexOf(".") + 1);
                string CSV2         = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename3 + "csv");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(CSV2.Contains("Status,Verified,From,Invoice Number,Completed,Amount,Billzy Column\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-06,2018-10-17,600.00,\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-08,2018-10-17,800.00,\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-07,2018-10-17,690.00,You saved $10.00"));
                //Assert.IsTrue(CSV2.Contains("Status,Verified,From,Invoice Number,Completed,Amount,Billzy Column\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-06,2018-10-18,600.00,\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-08,2018-10-18,800.00,\nPAID,NOT VERIFIED,billzyBiz-380887,Upload_PDF_P-07,2018-10-18,690.00,You saved $10.00"));

                //testInfo = 'Export Modal for Received - History - MYOB CSV'
                Recpg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Recpg.MYOB().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.AccountNumber().SendKeys("031982");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.NextBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);
                string rExportModalTitle1 = ExportMlPg.ExportModalTitle().Text;
                string rExportMessage1    = ExportMlPg.ExportMessage().Text;
                bool   ricon1             = ExportMlPg.ExportDownloadIcon().Displayed;
                string rhyperlink1        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(rExportModalTitle1.Contains("Export") && rExportMessage1.Contains("Your download should start automatically. ") && ricon1 == true && rhyperlink1.Contains("here"));
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink4 = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink4     = exportlink4.Substring(exportlink4.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename4 = CSVLink4.Substring(0, CSVLink4.LastIndexOf(".") + 1);
                string MYOB2        = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename4 + "txt");
                Assert.IsTrue(MYOB2.Contains("Co./Last Name,Date,Supplier Invoice #,Description,Account Number,Amount,Tax Code,Tax Amount,Purchase Status,Terms - Payment is Due,           - Balance Due Days,Amount Paid,Inc-Tax Amount"));
                Assert.IsTrue(MYOB2.Contains("billzyBiz-380887,18/10/2018,Upload_PDF_P-06,,031982,545.45,GST,54.55,B,2,14,600.00,600.00\n\nbillzyBiz-380887,18/10/2018,Upload_PDF_P-07,,031982,636.36,GST,63.64,B,2,14,700.00,700.00\n\nbillzyBiz-380887,18/10/2018,Upload_PDF_P-08,,031982,727.27,GST,72.73,B,2,14,800.00,800.00"));

                //testInfo = 'Export Modal for Received - History - XERO CSV'

                Recpg.SelectExportFormat().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Recpg.XERO().Click();
                SeleniumSetMethods.WaitOnPage(secdelay5);


                string rExportModalTitle2 = ExportMlPg.ExportModalTitle().Text;
                string rExportMessage2    = ExportMlPg.ExportMessage().Text;
                bool   ricon2             = ExportMlPg.ExportDownloadIcon().Displayed;
                string rhyperlink2        = ExportMlPg.HereHypherLink().Text;
                SeleniumSetMethods.WaitOnPage(secdelay2);
                Assert.IsTrue(rExportModalTitle2.Contains("Export") && rExportMessage2.Contains("Your download should start automatically. ") && ricon2 == true && rhyperlink2.Contains("here"));
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportDownloadIcon().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);
                ExportMlPg.ExportCloseBTN().Click();
                SeleniumSetMethods.WaitOnPage(secdelay2);

                // Validating the CSV report
                string exportlink5 = SendPg.ExportCSVFile().GetAttribute("href");
                SeleniumSetMethods.WaitOnPage(secdelay2);
                string CSVLink5     = exportlink5.Substring(exportlink5.IndexOf("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/")).Replace("https://4impact-export-data-uat.s3.ap-southeast-2.amazonaws.com/", "");
                string csvfilename5 = CSVLink5.Substring(0, CSVLink5.LastIndexOf(".") + 1);
                string XERO2        = File.ReadAllText(@"C:\Users\Selenium\Downloads\" + csvfilename5 + "csv");
                Assert.IsTrue(XERO2.Contains("ContactName,EmailAddress,POAddressLine1,POCity,POPostalCode,POCountry,InvoiceNumber,Reference,InvoiceDate,DueDate,Description,Quantity,UnitAmount,AccountCode,TaxType,TaxAmount\nbillzyBiz-380887,[email protected],Testing St.,Brisbane,4000,AU,INV10214765,Upload_PDF_P-06,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,600.00,,GST,0.00\nbillzyBiz-380887,[email protected],Testing St.,Brisbane,4000,AU,INV10214773,Upload_PDF_P-07,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,700.00,,GST,0.00\nbillzyBiz-380887,[email protected],Testing St.,Brisbane,4000,AU,INV10214781,Upload_PDF_P-08,18/10/2018,01/01/2024,Exported from pay.billzy.com,1,800.00,,GST,0.00"));
                SeleniumSetMethods.WaitOnPage(secdelay2);
                WebDriver.Navigate().GoToUrl("https://demo.billzy.com/received");
                SeleniumSetMethods.WaitOnPage(secdelay4);
                HomePg.SignOutBTN().Click();
            }
            finally
            {
            }
        }
 public CustomerControllerTests()
 {
     SeleniumWebDriver.Bootstrap(SeleniumWebDriver.Browser.Chrome);
     _loginPage = new LoginPage(this);
 }
示例#36
0
 public new void SetUp()
 {
     Login = new LoginPage(Driver);
 }
示例#37
0
 public App()
 {
     InitializeComponent();
     DependencyService.Register <MockDataStore>();
     MainPage = new LoginPage();
 }
示例#38
0
 public void GivenINavigateToTheAssureLoginPage()
 {
     _loginPage = new LoginPage(AppSettings.Url);
 }
示例#39
0
 public SequentialReadScript(LoginPage login, StudentPage student, ReaderPage reader)
 {
     _login   = login;
     _student = student;
     _reader  = reader;
 }
示例#40
0
 public void ThenISeeAWelcomeMessage()
 {
     var loginPage = new LoginPage();
     loginPage.WelcomeMessage.Should().Be("Hello, " + Users.AdminUserName + "!");
 }
示例#41
0
 public CreateTaskSteps(IWebDriver driver)
 {
     this.driver = driver;
     loginPage   = new LoginPage(driver);
     myTasksPage = new MyTasksPage(driver);
 }
示例#42
0
 public LoginPage ClickOnLogin()
 {
     driver.FindElement(By.Id("loginLink")).Click();
     var loginPage = new LoginPage(driver);
     return loginPage;
 }
 public ForgotPasswordUnknownEmail(ITestOutputHelper output, IISExpress issexpress)
     : base(output, issexpress)
 {
     loginPage = new LoginPage(driver);
     loginPage.Browse();
 }
 public LoginRegisteredAccountSteps()
 {
     _loginPage     = new LoginPage();
     _registration  = new Registration();
     _externalFiles = new ExternalFiles();
 }
示例#45
0
        public void CreateUsersOfEachRoleType()
        {
            ///Test name
            testScriptName = "CreateUsersOfEachRoleType";

            try
            {
                // Start debug viewer for writting application logs
                applicationLog = new ApplicationLog(configFilesLocation, reportFileDirectory, testScriptName);
                applicationLog.StartDebugViewer();

                // Prepare test data file path
                string testDataFilePath = PrepareTestDataFilePath(testScriptName);
                string testDataDirectoryPath = PrepareTestDataDirectory(testScriptName);

                // Test Data
                TestData testData = new TestData(testDataFilePath);
                string schooltechUName = (string)testData.TestDataTable["schooltechUName"];
                string schooltechPassword = (string)testData.TestDataTable["schooltechPassword"];

                string teacherRole = (string)testData.TestDataTable["teacherRole"];
                string firstNameTeacher = (string)testData.TestDataTable["firstNameTeacher"];
                string lastNameTeacher = (string)testData.TestDataTable["lastNameTeacher"];
                string emailTeacher = (string)testData.TestDataTable["emailTeacher"];
                string passwordTeacher = (string)testData.TestDataTable["passwordTeacher"];

                string parentRole = (string)testData.TestDataTable["parentRole"];
                string firstNameParent = (string)testData.TestDataTable["firstNameParent"];
                string lastNameParent = (string)testData.TestDataTable["lastNameParent"];
                string emailParent = (string)testData.TestDataTable["emailParent"];
                string passwordParent = (string)testData.TestDataTable["passwordParent"];

                string authorRole = (string)testData.TestDataTable["authorRole"];
                string firstNameAuthor = (string)testData.TestDataTable["firstNameAuthor"];
                string lastNameAuthor = (string)testData.TestDataTable["lastNameAuthor"];
                string emailAuthor = (string)testData.TestDataTable["emailAuthor"];
                string passwordAuthor = (string)testData.TestDataTable["passwordAuthor"];

                string administratorRole = (string)testData.TestDataTable["administratorRole"];
                string firstNameAdministrator = (string)testData.TestDataTable["firstNameAdministrator"];
                string lastNameAdministrator = (string)testData.TestDataTable["lastNameAdministrator"];
                string emailAdministrator = (string)testData.TestDataTable["emailAdministrator"];
                string passwordAdministrator = (string)testData.TestDataTable["passwordAdministrator"];

                string schooltechRole = (string)testData.TestDataTable["schooltechRole"];
                string firstNameSchooltech = (string)testData.TestDataTable["firstNameSchooltech"];
                string lastNameSchooltech = (string)testData.TestDataTable["lastNameSchooltech"];
                string emailSchooltech = (string)testData.TestDataTable["emailSchooltech"];
                string passwordSchooltech = (string)testData.TestDataTable["passwordSchooltech"];

                string studentRole = (string)testData.TestDataTable["studentRole"];
                string firstNameStudent = (string)testData.TestDataTable["firstNameStudent"];
                string lastNameStudent = (string)testData.TestDataTable["lastNameStudent"];
                string emailStudent = (string)testData.TestDataTable["emailStudent"];
                string passwordStudent = (string)testData.TestDataTable["passwordStudent"];

                // Create browser instace
                browser = BrowserFactory.Instance.GetBrowser(browserId, testScriptName, configFilesLocation, driverPath);
                LoginPage loginPage = new LoginPage(browser);

                // Log in as Schooltech
                SchoolTechHomePage s_Homepage = loginPage.LoginAsSchoolTech(schooltechUName, schooltechPassword, base.applicationURL);
                Assert.IsNotNull(s_Homepage, "Failed to login to InPods application as Schooltech");
                WriteLogs(testScriptName, stepNo, "Login to InPods Application as Schooltech", "Pass", browser);
                stepNo++;

                // Navigate to schooltech admin
                SchoolTechAdminPage admin = s_Homepage.GoToSchooltechAdmin();
                Assert.IsNotNull(admin, "Failed to navigate to Schooltech Admin Page");
                WriteLogs(testScriptName, stepNo, "Navigate to Schooltech Admin Page", "Pass", browser);
                stepNo++;

                // Navigate to User Management page
                SchoolTechUserManagementPage manage = admin.GotoUserManagementPage();
                Assert.IsNotNull(manage, "Failed to navigate to User management Page");
                WriteLogs(testScriptName, stepNo, "Navigate to User management Page", "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Teacher'
                Assert.IsTrue(manage.CreateUser(teacherRole, firstNameTeacher, lastNameTeacher, emailTeacher, passwordTeacher), "Unable to Create User of type " + teacherRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + teacherRole, "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Parent'
                Assert.IsTrue(manage.CreateUser(parentRole, firstNameParent, lastNameParent, emailParent, passwordParent), "Unable to Create User of type " + parentRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + parentRole, "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Author'
                Assert.IsTrue(manage.CreateUser(authorRole, firstNameAuthor, lastNameAuthor, emailAuthor, passwordAuthor), "Unable to Create User of type " + authorRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + authorRole, "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Administrator'
                Assert.IsTrue(manage.CreateUser(administratorRole, firstNameAdministrator, lastNameAdministrator, emailAdministrator, passwordAdministrator), "Unable to Create User of type " + administratorRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + administratorRole, "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Schooltech'
                Assert.IsTrue(manage.CreateUser(schooltechRole, firstNameSchooltech, lastNameSchooltech, emailSchooltech, passwordSchooltech), "Unable to Create User of type " + schooltechRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + schooltechRole, "Pass", browser);
                stepNo++;

                // Create new user of Role - 'Student'
                Assert.IsTrue(manage.CreateUser(studentRole, firstNameStudent, lastNameStudent, emailStudent, emailStudent), "Unable to Create User of type " + studentRole);
                WriteLogs(testScriptName, stepNo, "Create new user of role " + studentRole, "Pass", browser);
                stepNo++;

                /// LogOff
                Assert.IsTrue(manage.LogOut(), "Failed to Log out");
                WriteLogs(testScriptName, stepNo, "LogOff", "Pass", browser);
            }
            catch (Exception exception)
            {
                WriteLogs(testScriptName, stepNo, exception.Message.ToString() + " Exception Occured in \"" + testScriptName + "\" Test case", "FAIL", browser);
                Assert.Fail();
            }
            finally
            {
                /// Close Debug viewer and verify log file
                applicationLog.StopDebugViewer();
                bool isExceptionFound = applicationLog.VerifyDebugLogFiles(reportFileDirectory, testScriptName);
                if (!isExceptionFound)
                {
                    WriteLogs(testScriptName, stepNo, "Exception/error found in log file", "INFO", browser);
                }
            }
        }
示例#46
0
 public void SetLoginCallback(LoginPage callback)
 {
     loginCallback = callback;
 }
示例#47
0
 public void EN_Facility_Settings_CAA_Setting()
 {
     Browser.Open();
     LoginPage.SignIn();
     //Step 1  Log in as Facility Administrator.
     //Step 2  Click Admin tile.
     LandingPage.NavigateToAdminPage();
     //Step 3  Click Facility Settings in the left hand menu.
     AdminPage.NavigateToFacilitySettings();
     //Step 4  "Care Areas
     //      Check box with Use Care Area Assessments?
     //      Verify check box is checked signifying Care
     //      Area Assessments are turned on."
     if (Driver.IsElementPresent(By.XPath("(//input[@aria-checked='true'])[1]//ancestor::label[contains(., 'Use Care Area')]")))
     {
         Driver.ClickOn(FacilitySettingsPage.saveButton);
     }
     else
     {
         Driver.ClickOn(By.XPath("//div[@class='icheckbox_square-blue']"));
         Driver.ClickOn(FacilitySettingsPage.saveButton);
     }
     //Step 5  Click SAVE button.
     //Step 6  Click the breadcrumb "Caribou CLC Suite"
     Driver.ClickOn(UserMenu.userIcon);
     //Step 7  Click Work In Progress Tile.
     Driver.ClickOn(UserMenu.wipIcon);
     //Step 8  "Select a resident with a comprehensive assessment (Admission or Annual).
     Driver.ClickOn(WorkInProgressPage.ppsFilterButtonChecked);
     if (Driver.IsElementPresent(By.XPath(admissionOpenWIP)))
     {
         Driver.ClickOn(By.XPath(admissionOpenWIP));
     }
     else
     {
         Driver.ClickOn(SchedulePage.twoPagination);
         Driver.ClickOn(By.XPath(admissionOpenWIP));
     }
     //Click OPEN WIP button to the right of the Assessment to be opened."
     //Step 9  Click Section V in the left hand menu.
     //Step 10 "Scroll to V0200. CAAs and Care Planning
     //A.CAA Results"
     //Step 11 Verify Details column displays CAA buttons signifying that the Care Area Assessments are active.
     Driver.WaitFor(4);
     Browser.ScrollToElement("//*[@id='sectionv-content']/div[10]/div/div/div[1]/button");
     VerifyElement.IsPresent(By.XPath("(//button[@uib-tooltip='Delirium Assessment'])[1]"));
     //Step 12 Click Cancel.
     //Step 13 Click the breadcrumb "Caribou CLC Suite"
     Driver.ClickOn(UserMenu.caribouCLCSuiteLink);
     //Step 14 Click Admin tile.
     LandingPage.NavigateToAdminPage();
     //Step 15 Click Facility Settings in the left hand menu.
     AdminPage.NavigateToFacilitySettings();
     //Step 16 "Care Areas
     //Uncheck check box for Use Care Area Assessments signifying Care Area Assessments are turned off."
     Driver.ClickOn(By.XPath("(//input[@aria-checked='true'])[1]//ancestor::label[contains(., 'Use Care Area')]"));
     //Step 17 Click SAVE button.
     Driver.ClickOn(FacilitySettingsPage.saveButton);
     //Step 18 Click the breadcrumb "Caribou CLC Suite"
     Driver.ClickOn(UserMenu.userIcon);
     //Step 19 Click Work In Progress tile.
     Driver.ClickOn(UserMenu.wipIcon);
     //Step 20 "Select a resident with a comprehensive  assessment (Admission or Annual).
     //Click OPEN WIP button to the right of the Assessment to be opened."
     Driver.ClickOn(WorkInProgressPage.ppsFilterButtonChecked);
     if (Driver.IsElementPresent(By.XPath(admissionOpenWIP)))
     {
         Driver.ClickOn(By.XPath(admissionOpenWIP));
     }
     else
     {
         Driver.ClickOn(SchedulePage.twoPagination);
         Driver.ClickOn(By.XPath(admissionOpenWIP));
     }
     //Step 21 Click Section V.
     Driver.ClickOn(By.XPath("//a[contains(., 'Section V')]"));
     //Step 22  Click Section V in the left hand menu.
     //Step 23 "Scroll to V0200. CAAs and Care Planning
     //A.CAA Results"
     Driver.WaitFor(4);
     Browser.ScrollToElement("//*[@id='sectionv-content']/div[10]/div/div/div[1]/button");
     //Step 24 Verify that Details column does not exist.
     VerifyElement.IsNotPresent(By.XPath("(//button[@uib-tooltip='Delirium Assessment'])[1]"));
     //Step 25 Click the breadcrumb "Caribou CLC Suite"
     Driver.ClickOn(UserMenu.userIcon);
     Driver.ClickOn(UserMenu.signoutButton);
 }
示例#48
0
 public LoginFlows()
 {
     loginPage = new LoginPage();
 }
示例#49
0
 public void BeforeScenario()
 {
     this._loginPage = new LoginPage(this);
 }
示例#50
0
 public LoginPageOps()
 {
     page = new LoginPage();
     PageFactory.InitElements(SeleniumHelper.Browser.WebDriver, page);
 }
示例#51
0
 public void WhenIEnterMyCredentials()
 {
     var loginPage = new LoginPage();
     loginPage.LoginAsAdmin();
 }
示例#52
0
        public void AddAddressChecktoutoMyAccount()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                user         = dataFactory.CreateLoginAccount(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            //checkoutPage.SelectAddressRadioButton(AddressSelectOptions.New);

            Thread.Sleep(5000);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, testData.attn);

            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, testData.address);

            checkoutPage.SetAddressElement(AddressInputs.Apt, testData.apt);

            checkoutPage.SetAddressElement(AddressInputs.City, testData.city);

            checkoutPage.SetAddressElement(AddressInputs.State, testData.state);

            checkoutPage.SetAddressElement(AddressInputs.Postal, testData.zipCode);

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            //checkoutPage.SelectBillingRadioButton(BillingSelectOptions.Existing);
            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            //checkoutPage.PlaceOrderSubmitClick();
            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");

            //CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            indexPage = orderpage.ContinueShoppingClick();

            //AddressesHomePage addresspage = indexPage.Header.ClickOnAddresses();

            //var dropdownItems = addresspage.GetAddressesDropdownItems(AccessLevel.User).ToList();

            ////just created address data
            //string createdAddress = string.IsNullOrEmpty(testData.apt) ?
            //    $"{testData.address}, {testData.city} {testData.countryShort} {testData.zipCode}"
            //    :
            //    $"{testData.address}, {testData.apt}, {testData.city} {testData.countryShort} {testData.zipCode}";

            ////search the address in the user level dropdown
            //string expectedAddress = dropdownItems.FirstOrDefault(x => x.Contains(createdAddress));

            //Assert.IsNotNull(expectedAddress, "Address is not found in dropdown");
        }
 protected override void OnElementChanged(VisualElementChangedEventArgs e)
 {
     base.OnElementChanged(e);            
     loginPage = e.NewElement as LoginPage;
 }
示例#54
0
        public void E2ETestwithContactInfoandAddressUser()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                //Make sure to change name of email
                user         = dataFactory.CreateLoginAccount(),
                country      = (string)testContext.DataRow["Country"],
                countryShort = (string)testContext.DataRow["CountryShort"],
                address      = (string)testContext.DataRow["StreetAddress"],
                state        = (string)testContext.DataRow["State"],
                city         = (string)testContext.DataRow["City"],
                zipCode      = testContext.DataRow["ZipCode"].ToString(),
                apt          = testContext.DataRow["Apt"].ToString(),
                firstname    = (string)testContext.DataRow["FirstName"],
                lastname     = (string)testContext.DataRow["LastName"],
                company      = (string)testContext.DataRow["Company"],
                phonenumber  = testContext.DataRow["PhoneNumber"].ToString(),
                attn         = testContext.DataRow["ATTN"].ToString(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            var manufacturesItems = indexPage.Header.GetManufacturerOptions();

            manufacturerOption = manufacturesItems.ElementAtOrDefault(2).webElement.Text;

            indexPage.Header.SelectManufacturer(manufacturerOption);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }
 public void AuthenticateWithTouchId(LoginPage page)
 {
 }
 public LoginPageObjectSteps(ScenarioContext scenarioContext)
 {
     _webDriver = scenarioContext["WEB_DRIVER"] as IWebDriver;
     loginPage  = new LoginPage(_webDriver);
 }
示例#57
0
        public void CreateTechadminAndInstituteManually()
        {
            ///Test name
            testScriptName = "CreateTechadminAndInstituteManually";

            try
            {
                /// Start debug viewer for writting application logs
                applicationLog = new ApplicationLog(configFilesLocation, reportFileDirectory, testScriptName);
                applicationLog.StartDebugViewer();

                /// Prepare test data file path
                string testDataFilePath = PrepareTestDataFilePath(testScriptName);
                string testDataDirectoryPath = PrepareTestDataDirectory(testScriptName);

                /// Test Data
                TestData testData = new TestData(testDataFilePath);
                string superUName = (string)testData.TestDataTable["SuperUName"];
                string superPassword = (string)testData.TestDataTable["SuperPassword"];
                string firstName = (string)testData.TestDataTable["FirstName"];
                string lastName = (string)testData.TestDataTable["LastName"];
                string email  = (string)testData.TestDataTable["Email"];
                string password = (string)testData.TestDataTable["Password"];
                string instituteName = (string)testData.TestDataTable["InstituteName"];
                string instituteDescription = (string)testData.TestDataTable["InstituteDescription"];
                string instituteShortName= (string)testData.TestDataTable["InstituteShortName"];
                string logoFilePath= testDataDirectoryPath + (string)testData.TestDataTable["LogoFileName"];
                string schoolTechName= (string)testData.TestDataTable["SchoolTechName"];
                string timeZone= (string)testData.TestDataTable["TimeZone"];
                string passwordReset= (string)testData.TestDataTable["PasswordReset"];

                /// Create browser instace
                browser = BrowserFactory.Instance.GetBrowser(browserId, testScriptName, configFilesLocation, driverPath);
                LoginPage loginPage = new LoginPage(browser);

                /// Log in as Super
                SuperHomePage s_Homepage = loginPage.LoginAsSuper(superUName, superPassword, base.applicationURL);
                Assert.IsNotNull(s_Homepage, "Failed to login to InPods application as Super");
                WriteLogs(testScriptName, stepNo, "Login to InPods Application as Super", "Pass", browser);
                stepNo++;

                /// Go to Admin Page
                SuperAdminPage admin = s_Homepage.GotoSuperAdminPage();
                Assert.IsNotNull(admin, "Failed to navigate to super admin page");
                WriteLogs(testScriptName, stepNo, "Navigate to Admin page", "Pass", browser);
                stepNo++;

                /// Click on CreateInstitute Link
                CreateInstitutePage newInstitute = admin.GoToCreateInstitutePage();
                Assert.IsNotNull(newInstitute, "Failed to navigate to Create Institute Page");
                WriteLogs(testScriptName, stepNo, "Navigate to CreateNewInstitutePage", "Pass", browser);
                stepNo++;

                /// Create TechAdmin as schooltech
                Assert.IsTrue(newInstitute.CreateTechadmin(firstName, lastName, email, password), "Failed to create tech admin");
                WriteLogs(testScriptName, stepNo, "Create TechAdmin", "Pass", browser);
                stepNo++;

                /// Add new institute
                Assert.IsTrue(newInstitute.AddNewInstitute(instituteName, instituteDescription, instituteShortName, logoFilePath, schoolTechName, timeZone, passwordReset), "Failed to create new institute");
                WriteLogs(testScriptName, stepNo, "Create New institute", "Pass", browser);
                stepNo++;

                /// LogOff
                Assert.IsTrue(newInstitute.LogOut(), "Failed to Log out");
                WriteLogs(testScriptName, stepNo, "LogOff", "Pass", browser);
            }
            catch (Exception exception)
            {
                WriteLogs(testScriptName, stepNo, exception.Message.ToString() + " Exception Occured in \"" + testScriptName + "\" Test case", "FAIL", browser);
                Assert.Fail();
            }
            finally
            {
                /// Close Debug viewer and verify log file
                applicationLog.StopDebugViewer();
                bool isExceptionFound = applicationLog.VerifyDebugLogFiles(reportFileDirectory, testScriptName);
                if (!isExceptionFound)
                {
                    WriteLogs(testScriptName, stepNo, "Exception/error found in log file", "INFO", browser);
                }
            }
        }
示例#58
0
        public void OnlyPaymentMethodAdded()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                //Make sure to change name of email
                user = dataFactory.CreateLoginAccount(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            Thread.Sleep(2000);

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SetAddressElement(AddressInputs.ATTN, "CompanyOrName");
            checkoutPage.SetAddressElement(AddressInputs.StreetAddress, "123 Massachusetts Avenue");
            checkoutPage.SetAddressElement(AddressInputs.Apt, "12345");
            checkoutPage.SetAddressElement(AddressInputs.City, "Cambridge");
            checkoutPage.SetAddressElement(AddressInputs.State, "MA");
            checkoutPage.SetAddressElement(AddressInputs.Postal, "02138");

            checkoutPage.ClickShippingButton();

            //Thread.Sleep(2000);

            Thread.Sleep(5000);

            checkoutPage.SelectBillingRadioButton(BillingSelectOptions.New);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(2000);

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            checkoutPage.BillingSubmitClick();

            Thread.Sleep(3000);

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }
示例#59
0
        public void LoginTestCase()
        {
            /// Test case name
            testScriptName = "LoginTestCase";

            try
            {
                /// Start debug viewer for writting application logs
                applicationLog = new ApplicationLog(configFilesLocation, reportFileDirectory, testScriptName);
                applicationLog.StartDebugViewer();

                /// Prepare test data file path
                string testDataFilePath = PrepareTestDataFilePath(testScriptName);

                /// Test Data
                TestData testData = new TestData(testDataFilePath);
                string schooltechUName = (string)testData.TestDataTable["SchooltechUName"];
                string schooltechPassword = (string)testData.TestDataTable["SchooltechPassword"];

                /// Create browser instace
                browser = BrowserFactory.Instance.GetBrowser(browserId, testScriptName, configFilesLocation, driverPath);
                LoginPage loginPage = new LoginPage(browser);

                /// Log in as Schooltech
                SchoolTechHomePage st_Homepage = loginPage.LoginAsSchoolTech(schooltechUName, schooltechPassword, base.applicationURL);
                Assert.IsNotNull(st_Homepage, "Failed to login to InPods application as Schooltech");
                WriteLogs(testScriptName, stepNo, "Login to InPods Application as Schooltech", "Pass", browser);
                stepNo++;

                /// Validate if the login is of type SchoolTech
                Assert.IsTrue(st_Homepage.ValidateSchoolTechUserProfile(), "Failed to validate current login as Schooltech");
                WriteLogs(testScriptName, stepNo, "Validate current Login as Schooltech", "Pass", browser);
            }
               catch (Exception exception)
            {
                WriteLogs(testScriptName, stepNo, exception.Message.ToString() + " Exception Occured in  \"" + testScriptName + "\" Test case", "FAIL", browser);
                Assert.Fail();
            }
            finally
            {
                /// Close Debug viewer and verify log file
                applicationLog.StopDebugViewer();
                bool isExceptionFound = applicationLog.VerifyDebugLogFiles(reportFileDirectory, testScriptName);
                if (!isExceptionFound)
                {
                    WriteLogs(testScriptName, stepNo, "Exception/error found in log file", "INFO", browser);
                }
            }
        }
示例#60
0
        public void OnlyContactInformationadded()
        {
            var indexPage = new IndexPage(driver, url);

            var testData = new
            {
                //Make sure to change name of email
                user = dataFactory.CreateLoginAccount(),
            };

            LoginPage loginPage = indexPage.Header.ClickOnSignIn();

            indexPage = loginPage.Login(testData.user.Email, testData.user.Password);

            indexPage.Header.SelectManufacturer(manufacturerOption);

            indexPage.Header.SetSearchFieldText(searchField);

            CatalogItemsPage catalogItemPage = indexPage.Header.ClickOnSearchButton();

            catalogItemPage.AddtoCartbuttonInCatalog();

            Thread.Sleep(5000);

            CartPage CartMainPage = catalogItemPage.Header.ClickOnViewCart();

            //Waiting For Loading Cart
            Thread.Sleep(7000);

            //Click no Proceed to checkout button
            CheckoutPage checkoutPage = CartMainPage.ProceedToCheckOut();

            Thread.Sleep(5000);

            checkoutPage.SelectAddressRadioButton(AddressSelectOptions.Existing);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInAddressDropDown();

            checkoutPage.ClickShippingButton();

            Thread.Sleep(5000);

            PaymentOptionModel cardToken = new PaymentOptionModel
            {
                CardNumber     = "4111111111111111",
                ExpirationMont = "12",
                ExpirationYear = "24",
                HolderName     = "Test corp",
                Cvv            = "077"
            };

            checkoutPage.SetBillingElement(BillingInputs.CardHolderName, cardToken.HolderName);
            checkoutPage.SetBillingElement(BillingInputs.CardNumber, cardToken.CardNumber);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationMonth, cardToken.ExpirationMont);
            checkoutPage.SetBillingElement(BillingInputs.ExpirationYear, cardToken.ExpirationYear);
            checkoutPage.SetBillingElement(BillingInputs.CVV, cardToken.Cvv);

            Thread.Sleep(5000);

            checkoutPage.SelectFirstInBillingDropDown();

            Assert.IsTrue(checkoutPage.BillingButtonIsEnable(), "Proceed to Review and Place Your Order button is not available");

            Thread.Sleep(5000);

            checkoutPage.BillingSubmitClick();

            Assert.IsTrue(checkoutPage.PlaceOrderButtonIsEnable(), "Place Your Order button is not available");

            Thread.Sleep(5000);

            OrderConfirmationPage orderpage = checkoutPage.PlaceOrderSubmitClick();

            Assert.IsTrue(checkoutPage.OrderConfirmationText(), "Order Confirmation text is not available");
        }