示例#1
0
        public void TestUserStory8()
        {
            try
            {
                const String INPUT_FILE = "User.xml";
                const String AUTOR      = "Alex";
                const String CONTINUT   = "Foarte";
                const string SUBJECT    = "Covor Sierpinski";
                const string CATEGORY   = "Fractali Turtle";
                User         user       = XML.DeserializeObject <User>(FileUtils.CreateInputPath(INPUT_FILE));

                PropertiesCollection.OpenURL(Constants.START_URL);
                Panel.Log_Click();
                Authentication.Login(user);
                Panel.Galerie_Click();
                ForumClass.NavigateToCategory(CATEGORY);
                ForumClass.NavigateToSubject(SUBJECT);
                ForumClass.SearchAutor(AUTOR);
                Sincronize.Wait(7500);
                ForumClass.SearchContent(CONTINUT);
            }
            catch (Exception e)
            {
                Logger.LogException("", e);
                Assert.Fail(e.Message);
            }
        }
示例#2
0
        public static void SetUp(TestContext context)
        {
            //PropertiesCollection.Driver = new InternetExplorerDriver();
            //PropertiesCollection.Driver = new FirefoxDriver();
            PropertiesCollection.Driver = new ChromeDriver();
            //PropertiesCollection.Driver = new EdgeDriver();

            Sincronize.SetImplicitWait(60);
            Sincronize.SetPageLoad(60);
        }
示例#3
0
        public static void OpenNewBrowser(String URL, BrowserType.Browser type)
        {
            IWebDriver webDriver = null;

            ChoseDriver(ref webDriver, type);
            webDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5000));
            webDriver.Navigate().GoToUrl(URL);
            Sincronize.Wait(3200);
            mDriver = webDriver;
        }
        public static void OpenNewBroser(String URL, BrowserType.Browser type)
        {
            IWebDriver webDriver = null;

            ChoseDriver(ref webDriver, type);
            webDriver.Navigate().GoToUrl("http://www.pushmodelslocal.ro:8081/arizona-promo-models.php");
            webDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5000));
            webDriver.Navigate().GoToUrl(URL);
            Sincronize.Wait(3200);
            mDriver = webDriver;
        }
示例#5
0
        public static void GetRole(UserRole userRole)
        {
            const int SELECT_ROLE_INDEX_IN_DOM = 4;
            const int SAVE_BUTTON_INDEX_IN_DOM = 5;
            var       tr     = SeleniumGetMethods.Parent(SeleniumGetMethods.Parent(SeleniumGetMethods.GetWebElementInnerHTML(userRole.Username)));
            var       select = SeleniumGetMethods.GetFirstChild(SeleniumGetMethods.GetChild(SELECT_ROLE_INDEX_IN_DOM, tr));

            SeleniumSetMethods.SelectDropDown(select, userRole.Role);
            Sincronize.Wait(2000);
            var save = SeleniumGetMethods.GetFirstChild(SeleniumGetMethods.GetChild(SAVE_BUTTON_INDEX_IN_DOM, tr));

            save.Click();
        }
示例#6
0
 public void TestUserStory2()
 {
     try
     {
         PropertiesCollection.OpenURL(Constants.START_URL);
         Panel.Galerie_Click();
         Sincronize.Wait(5000);
     }
     catch (Exception e)
     {
         Logger.LogException("", e);
         Assert.Fail(e.Message);
     }
 }
示例#7
0
        public void TestUserStory5()
        {
            try
            {
                const String INPUT_FILE = "User.xml";
                User         user       = XML.DeserializeObject <User>(FileUtils.CreateInputPath(INPUT_FILE));

                PropertiesCollection.OpenURL(Constants.START_URL);
                Panel.Log_Click();
                Authentication.Login(user);
                Panel.Galerie_Click();
                Sincronize.Wait(5000);
            }
            catch (Exception e)
            {
                Logger.LogException("", e);
                Assert.Fail(e.Message);
            }
        }
示例#8
0
        public void TestLogin()
        {
            Logger.LogInfo("Test Login:"******"User.xml";
                User         user       = XML.DeserializeObject <User>(FileUtils.CreateInputPath(INPUT_FILE));

                PropertiesCollection.OpenURL(Constants.START_URL);
                Panel.Log_Click();
                LoginClass.Login(user);
                Sincronize.Wait(6000);
                ForumTest.ProjectComponent.LoginClass.LogOff();
            }
            catch (Exception ex)
            {
                Assert.Fail();
                Logger.LogException("", ex);
            }
        }