Esempio n. 1
0
        public void WhenIPressLogin()
        {
            LogInPage loginpage = new LogInPage();

            loginpage.WaitForThePageToLoad();
            loginpage.clickLoginButton();
        }
        public void NetworkSearch()
        {
            LogInPage logIn = new LogInPage(driver);

            SeleniumExtras.PageObjects.PageFactory.InitElements(driver, logIn);
            logIn.LogIn("bakersgaynor", "Aramark22");

            Thread.Sleep(3000);

            HomePage home = new HomePage(driver);

            SeleniumExtras.PageObjects.PageFactory.InitElements(driver, home);
            home.GoToNetworkDashboard();

            NetworkDashboard network = new NetworkDashboard(driver);

            SeleniumExtras.PageObjects.PageFactory.InitElements(driver, network);
            network.SearchCompany("adelie");

            NetworkResults results = new NetworkResults(driver);

            SeleniumExtras.PageObjects.PageFactory.InitElements(driver, results);
            results.ClickResult();

            Assert.AreEqual("www.adeliefoods.co.uk", driver.FindElement(By.LinkText("www.adeliefoods.co.uk")).Text);

            HomePage homePage = new HomePage(driver);

            SeleniumExtras.PageObjects.PageFactory.InitElements(driver, homePage);
            homePage.LogOff();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            using (var driver = Setup.Configure())
            {
                var loginPage          = new LogInPage(driver, null, null, null);
                var itemListComponent  = new ItemListComponent(driver);
                var userFollowingModal = new UserFollowingModal(driver, itemListComponent);
                var userPage           = new UserPage(driver, null, userFollowingModal);

                loginPage.Navigate();
                loginPage.Username = "";
                loginPage.Password = "";
                loginPage.LoginButton();

                userPage.Navigate("viorlecinn");
                userPage.FollowingButton();

                var users = itemListComponent.Obtain(500);
                users.Reverse();
                var quantityToUnfollow = 5;
                foreach (var user in users)
                {
                    if (quantityToUnfollow <= 0)
                    {
                        break;
                    }

                    itemListComponent.Unfollow(user);
                    quantityToUnfollow--;
                }
            }
        }
Esempio n. 4
0
        public LogInPage ClickLogin()
        {
            loginButton.Click();
            LogInPage loginPage = new LogInPage();

            return(loginPage);
        }
        public LogInPage NavigateToLogIn()
        {
            MenuPage  menuPage  = new MenuPage();
            LogInPage loginPage = menuPage.ClickLogin();

            return(loginPage);
        }
Esempio n. 6
0
        public static void LogInPage()
        {
            using (var driver = DriverUtils.CreateWebDriver())
            {
                driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
                driver.Navigate().GoToUrl(Config.GetUrl());

                Thread.Sleep(1000);
                driver.Title.ShouldBe(LogInLogOut.LogInPage());
                Console.WriteLine($"{LogInLogOut.LogInPage()} opens.");

                var logInPage = new LogInPage(driver);

                logInPage.LogIn(LogInLogOut.Username(), LogInLogOut.Password());

                Thread.Sleep(1000);

                driver.Title.ShouldBe(LogInLogOut.ClientPage());
                Console.WriteLine($"{LogInLogOut.ClientPage()} opens.");

                logInPage.GetAdminURL().ShouldBe(LogInLogOut.AdminURL());
                Console.WriteLine($"'admin' link is {LogInLogOut.AdminURL()}");

                logInPage.ClickLogOut();

                Thread.Sleep(1000);

                driver.Title.ShouldBe(LogInLogOut.LogInPage());
                Console.WriteLine($"{LogInLogOut.LogInPage()} opens again.");
            }
        }
        public void bbSignInTest()
        {
            //Construct a home page object and a login page object
            //Get my username and password from a text file
            //In your Test case remember to create your own username and password and set its path
            BBHome    hpage = new BBHome(driver);
            LogInPage lpage = new LogInPage(hpage.driver);

            string[] lines = System.IO.File.ReadAllLines(@"C:\Users\smoodywo\Documents\practiceProjects\WHF_Practice\bestBuyLog.txt");
            hpage.loginBtn.Click();
            Thread.Sleep(2000);

            //Moving over to the title page, send keys acquired from the text file from earlier
            //here we are also asserting that the previous link worked and that we are on the correct page
            string pgTitle = driver.Title;

            Assert.That(pgTitle, Is.EqualTo("Sign In to Developer.BestBuy.com"));
            lpage.loginEmail(lines[0]);
            lpage.loginPassword(lines[1]);
            lpage.logInSnd();
            Thread.Sleep(2000);

            //Here The assert statement test to make sure that the proper page has apeared and that the elements have changed.
            Assert.That(driver.Title, Is.EqualTo("Best Buy | Official Online Store | Shop Now & Save"));
            driver.Url = "https://developer.bestbuy.com/";
            IList <IWebElement> temp = hpage.driver.FindElements(By.LinkText("DASHBOARD"));

            Assert.That(temp.Count, Is.EqualTo(1));
        }
Esempio n. 8
0
        public void NavigateToLogInPage()
        {
            LogInPage login = _home.ClickLoginLink();

            Assert.That(_driver.Title, Does.Contain("Log In ‹ opensourcecms — WordPress"), "Title not found on page");
            Assert.That(_driver.PageSource, Does.Contain("Username or Email Address"));
        }
Esempio n. 9
0
        public MainWindow()
        {
            InitializeComponent();

            Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height + 2; //SystemParameters.MaximizedPrimaryScreenHeight;
            Width  = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width + 2;  //SystemParameters.MaximizedPrimaryScreenWidth;

            mainWindow       = this;
            lblTitle.Content = this.Title += " v." + Assembly.GetExecutingAssembly().GetName().Version;
            LogInPage p = new LogInPage();

            mrFrame.NavigationService.Navigate(p);

            //this.SourceInitialized += Window1_SourceInitialized;
            //this.Deactivated += Window_Deactivated;

            //AppDomain currentDomain = default(AppDomain);
            //currentDomain = AppDomain.CurrentDomain;
            //// Handler for unhandled exceptions.
            //currentDomain.UnhandledException += GlobalUnhandledExceptionHandler;
            //System.Windows.Forms.Application.ThreadException += GlobalThreadExceptionHandler;
            //AllowMoving(false);

            //SetStartup();
            //DisableUAC();
            ////ShutDowwnIfPowerOffline();
            ////SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(SystemEvents_PowerModeChanged);
            //DisableWindowsUpdate();
        }
Esempio n. 10
0
 public Test4()
 {
     _homePage      = new HomePage(Driver);
     _logInPage     = new LogInPage(Driver);
     _myAccountPage = new MyAccountPage(Driver);
     _dashboardPage = new AccountDashboardPage(Driver);
 }
Esempio n. 11
0
        public void ThenIShouldSeeWelcomeMessage()

        {
            LogInPage loginPage = new LogInPage(driver);

            Assert.IsTrue(loginPage.isWelcomeMessageDisplayed());
        }
        public void LogInButtonCheck()
        {
            LogInPage logIn = new LogInPage(driver);

            Assert.IsTrue(logIn.LoginButton.Displayed);
            Assert.AreEqual(logIn.LoginButton.Text, "Log In");
        }
Esempio n. 13
0
        public void SetupBeforeEachTest()
        {
            driver    = new FirefoxDriver();
            loginpage = new LogInPage(driver);

            loginpage.LoadPage();
        }
        public void LogInPageUsernameLabelCheck()
        {
            LogInPage logIn = new LogInPage(driver);

            Assert.IsTrue(logIn.UserNameLabel.Displayed);
            Assert.AreEqual(logIn.UserNameLabel.GetAttribute("name"), "Username");
        }
        public void LogInPagePasswordLabelCheck()
        {
            LogInPage logIn = new LogInPage(driver);

            Assert.IsTrue(logIn.PasswordLabel.Displayed);
            Assert.AreEqual(logIn.PasswordLabel.GetAttribute("name"), "Password");
        }
        public void LogInPageHeaderCheck()
        {
            LogInPage logIn = new LogInPage(driver);

            Assert.IsTrue(logIn.LoginPageHeader.Displayed);
            Assert.AreEqual(logIn.LoginPageHeader.Text, "Paylocity Benefits Dashboard");
        }
        private void logOutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            LogInPage logout = new LogInPage();

            logout.Show();
        }
        private void LoginButton_Click(object sender, EventArgs e)
        {
            this.Hide();
            LogInPage logInPage = new LogInPage();

            logInPage.Show();
        }
Esempio n. 19
0
        public void ClientSearchPage()
        {
            using (var driver = DriverUtils.CreateWebDriver())
            {
                driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
                driver.Navigate().GoToUrl(Config.GetUrl());

                var logInPage = new LogInPage(driver);

                logInPage.LogIn(LogInLogOut.Username(), LogInLogOut.Password());

                var clientSearchPage = new SearchClientPage(driver);
                clientSearchPage.ClickSearchClient();
                clientSearchPage.SearchBy(SearchClient.Email());
                clientSearchPage.ClickSearch();

                var tableText = clientSearchPage.GetTableText();
                Console.WriteLine(tableText);

                clientSearchPage.GetFirstName().ShouldBe(SearchClient.Iryna());
                Console.WriteLine($"First Name: {clientSearchPage.GetFirstName()}");

                clientSearchPage.GetLastName().ShouldBe(SearchClient.Shch());
                Console.WriteLine($"Last Name: {clientSearchPage.GetLastName()}");
            }
        }
Esempio n. 20
0
        public ChangeUserInfoTest(BaseFixture fixture) : base(fixture)
        {
            BeginTest();

            header    = ConstructPage <Header>();
            logInPage = header.GoToLogInPage();
        }
        public void GivenIOpenWebScraperTestingGroundWebsite()
        {
            LogInPage logInPage = new LogInPage(driver);

            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl(logInPage.homepage);
        }
Esempio n. 22
0
 public static AccountPage LogIn(this LogInPage logInPage, string username, string password)
 {
     return(logInPage
            .FillUsername(username)
            .FillPassword(password)
            .ClickLogInButton());
 }
Esempio n. 23
0
        public void WhenIClickOnLogInButton()

        {
            LogInPage logInPage = new LogInPage(driver);

            logInPage.clickLogInButton();
        }
Esempio n. 24
0
        public void TestMethod1()
        {
            HomePage              homePage              = new HomePage(driver);
            LogInPage             logInPage             = new LogInPage(driver);
            MyAccountPage         myAccountPage         = new MyAccountPage(driver);
            CatalogPage           catalogPage           = new CatalogPage(driver);
            Window                window                = new Window(driver);
            ShoppingCartPage      shoppingCartPage      = new ShoppingCartPage(driver);
            AdressPage            adressPage            = new AdressPage(driver);
            ShippingPage          shippingPage          = new ShippingPage(driver);
            PaymentPage           paymentPage           = new PaymentPage(driver);
            OrderSummaryPage      orderSummaryPage      = new OrderSummaryPage(driver);
            OrderConfirmationPage orderConfirmationPage = new OrderConfirmationPage(driver);

            homePage.GoToPage();
            homePage.ClickOnSignIn();
            logInPage.FillLogInForm("*****@*****.**", "clave1");
            logInPage.ClickOnSubmitLogin();
            Assert.AreEqual("Welcome to your account. Here you can manage all of your personal information and orders.", myAccountPage.GetSuccessMessage());
            myAccountPage.ClickOnWomenOption();
            catalogPage.ClickOnAddtoCartButton();
            window.ClickOnProceedCheckout();
            shoppingCartPage.ClickOnProceedCheckout();
            adressPage.ClickOnProceedCheckout();
            shippingPage.AgreeTermsOfService();
            shippingPage.ClickOnProceedCheckout();
            paymentPage.PaybyCheck();
            orderSummaryPage.ClickOnProceedCheckout();
            orderConfirmationPage.GetSuccessMessage();
        }
Esempio n. 25
0
        protected override async void OnStart()
        {
            var appleSignInService = DependencyService.Get <IAppleSignInService>();

            if (appleSignInService != null)
            {
                userId = await SecureStorage.GetAsync(AppleUserIdKey);

                if (appleSignInService.IsAvailable && !string.IsNullOrEmpty(userId))
                {
                    var credentialState = await appleSignInService.GetCredentialStateAsync(userId);

                    switch (credentialState)
                    {
                    case AppleSignInCredentialState.Authorized:
                        break;

                    case AppleSignInCredentialState.NotFound:
                    case AppleSignInCredentialState.Revoked:
                        //Logout;
                        SecureStorage.Remove(AppleUserIdKey);
                        Preferences.Set(LoggedInKey, false);
                        MainPage = new LogInPage();
                        break;
                    }
                }
            }
        }
Esempio n. 26
0
        public void TestLogIn()
        {
            _driver.Url = "http://www.store.demoqa.com";

            var homePage = new HomePage();

            //Initializes the elements of the homePage PageObject
            PageFactory.InitElements(_driver, homePage);
            homePage.MyAccount.Click(); //Clicks on the MyAccount button

            var loginPage = new LogInPage();

            //Initializes the elements of the loginPage PageObject
            PageFactory.InitElements(_driver, loginPage);
            //Note: Set up your own username and password at http://www.store.demoqa.com
            loginPage.UserName.SendKeys("dummyUserTest"); //Types the username in the text box
            loginPage.Password.SendKeys("$Olive%Pass$");  //Types the password in the other text box
            loginPage.Submit.Submit();                    //Submits the login request, this is like clicking the 'submit' button

            //Wait 4 seconds for page to load, this freezes the current processing thread
            System.Threading.Thread.Sleep(4000);

            var accountPage = new AccountPage();

            PageFactory.InitElements(_driver, accountPage);
            accountPage.Logout.Click();
            //Wait 4 seconds to make sure logout is successful
            System.Threading.Thread.Sleep(4000);
            _driver.Quit();
        }
Esempio n. 27
0
 public void Success_HappyPathLoginFlow()
 {
     _home          = GoToHomePage();
     _loginPage     = _home.ClickLoginLink();
     _dashboardPage = _loginPage.LoginFlow(ConfigurationManager.AppSettings["Username"], ConfigurationManager.AppSettings["Password"]);
     Assert.That(_dashboardPage.IsOnPage(), Is.EqualTo(true));
 }
Esempio n. 28
0
        public App()
        {
            //InitializeComponent();

            var loginPage = new NavigationPage(new LogInPage()
            {
                Title = "Chikwama"
            });

            var navService = DependencyService.Get <IChikwamaNavService>() as ChikwamaNavService;

            //var accountManager = DependencyService.Get<IAccountManager>() as AccountManager;
            //var walletManager = DependencyService.Get<IAccountManager>() as WalletManager;

            navService.navigation = loginPage.Navigation;

            navService.RegisterViewMapping(typeof(PasscodeViewModel), typeof(PasscodePage));
            navService.RegisterViewMapping(typeof(PassphraseViewModel), typeof(PassphraseConfirmationPage));
            navService.RegisterViewMapping(typeof(WalletViewModel), typeof(WalletPage));
            navService.RegisterViewMapping(typeof(LoginViewModel), typeof(LogInPage));
            navService.RegisterViewMapping(typeof(AccountViewModel), typeof(AccountPage));
            navService.RegisterViewMapping(typeof(TokenEntryViewModel), typeof(TokenEntryPage));
            navService.RegisterViewMapping(typeof(TokenDetailsViewModel), typeof(TokenDetailsPage));

            //walletManager.CreateWalletAsync();
            MainPage = new LogInPage();
        }
Esempio n. 29
0
        public void ThenUserGetsErrorMessage(Table table)
        {
            var set         = table.CreateDynamicSet();
            var expectedMsg = set.First().errorMessage;
            var actualText  = LogInPage.GetNotificationText();

            actualText.Should().Be(expectedMsg);
        }
Esempio n. 30
0
        public void GivenINavigateToWebScrapperHomepage()
        {
            LogInPage logInPage = new LogInPage(driver);

            driver.Navigate().GoToUrl(logInPage.homepage);

            driver.Manage().Window.Maximize();
        }
Esempio n. 31
0
 /*
 private static MeasureEditPage _measureEditPage;
 public static MeasureEditPage MeasureEditPage
 {
     get
     {
         if (null == _measureEditPage)
             _measureEditPage = new MeasureEditPage();
         return _measureEditPage;
     }
 }
 */
 //
 public static void Clear()
 {
     _loginPage          = null;
     _mainPage           = null;
     _measureListPage    = null;
     _changePasswordPage = null;
 }