Exemplo n.º 1
0
 public void BeforeScenario(ScenarioContext scenarioContext)
 {
     _driver = new ChromeDriver();
     _driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
     _driver.Manage().Timeouts().PageLoad     = TimeSpan.FromSeconds(10);
     _driver.Manage().Window.Maximize();
     _driver.Navigate().GoToUrl("https://www.unleashedsoftware.com/");
     scenarioContext.Add("currentDriver", _driver);
 }
Exemplo n.º 2
0
        public void loginToFB()
        {
            if (email is null || password is null)
            {
                throw new Exception("You must initialize Facebook email and password.");
            }

            if (groups[0].Equals(string.Empty))
            {
                driver.Navigate().GoToUrl(String.Format("https://www.facebook.com/"));
            }
            else
            {
                isGroup = true;
                driver.Navigate().GoToUrl(String.Format("https://www.facebook.com/groups/{0}/", groups[0]));
            }

            pageFacebookLogin = new global::FacebookAutomation.PageFacebookLogin(driver);
            pageFacebookLogin.Login(email, password);
        }
Exemplo n.º 3
0
        /// <summary>
        /// runs all 4 social media sites by selecting website/navigating to and running Run app method
        /// </summary>
        /// <param name="Dervalue">the value of 5</param>
        /// <param name="startSearch">i web driver DOM of page</param>
        internal static void RunAllSocialMediaSites(int Dervalue, OpenQA.Selenium.IWebDriver startSearch)
        {
            //BBotChecker nr = new BBotChecker();
            string uName = "", uPass = "";

            Dervalue -= 1;
            for (int socialRun = 1; Dervalue >= socialRun; socialRun++)
            {
                //needed to set radio value that selectwebaddress depends on
                var mediaSite = BBotChecker.SetRadioName(socialRun);
                // sets the url
                System.Threading.Thread.Sleep(10000);
                BBotChecker.SelectWebAddress(mediaSite);
                startSearch.Navigate().GoToUrl(BBotChecker.SetURL);

                uPass = BBotChecker.Passwords[socialRun - 1];
                uName = BBotChecker.Usernames[socialRun - 1];

                RunApp(startSearch, uName, uPass, socialRun);
            }
        }
Exemplo n.º 4
0
        public void Setup()
        {
            driver = new ChromeDriver();
            var loginPage = new LoginPage(driver);

            driver.Manage().Window.Maximize();
            driver.Navigate().GoToUrl("http://a.testaddressbook.com");
            loginPage.NavigateToLoginPage();
            Thread.Sleep(1000);

            loginPage.LoginApplication("*****@*****.**", "Parola1234");
            var homePage = new HomePage(driver);

            Thread.Sleep(1000);

            var addressesPage = homePage.NavigateToAddressesPage();

            Thread.Sleep(1000);

            addAddressPage = addressesPage.NavigateToAddAddressesPage();
            Thread.Sleep(1000);
        }
Exemplo n.º 5
0
 public void Navigate(string url)
 {
     driver.Navigate().GoToUrl("https://" + url);
 }