Ejemplo n.º 1
0
        public SelectWorkFlowPage NavigateToSelectWorkflowScreen(string emailAddress = TestUsername, string pin = TestPin, int indexOfTheEventToBeSelect = 1)
        {
            try
            {
                app.WaitForElement(x => x.Id("BtnLoginAutomationId"), "timed out", DefaultTimeoutForUiElementToRenderInSeconds);
                LoginPage loginPage = new LoginPage(app);
                loginPage.Login(emailAddress, pin);
                app.WaitForNoElement((x => x.Marked("Logging in...")), "Unable to login", DefaultApiCallTimeout);
            }
            catch (Exception)
            {
            }

            try
            {
                app.WaitForElement(x => x.Marked("SELECT EVENT"), "timed out", TimeSpan.FromSeconds(3));
                EventPage eventPage = new EventPage(app);
                eventPage.SelectEvent(indexOfTheEventToBeSelect);
                app.WaitForNoElement((x => x.Marked("Processing...")), "Unable to proceed to event", DefaultApiCallTimeout);
            }
            catch (Exception)
            {
            }

            try
            {
                app.WaitForElement(x => x.Marked("btn_swipe_card.png"), "timed out", DefaultTimeoutForUiElementToRenderInSeconds);
                return(new SelectWorkFlowPage(app));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }