public static void AddFriend(Browser browser)
        {
            loginPage = new LoginPage(browser);
            loginPage.LoginUser(TelerikUser.Related1);

            mainPage = new MainPage(browser);
            mainPage.NavigateTo(TelerikUser.Related2.Url);

            userPage = new UserProfilePage(browser);
            if (userPage.AddFriendButton != null && userPage.AddFriendButton.IsVisible())
            {
                userPage.ClickAddFriendButton();
                mainPage.ClickLogout();

                mainPage.NavigateTo(loginPage.Url);
                loginPage.LoginUser(TelerikUser.Related2);

                friendsPage = new FriendsPage(browser);
                mainPage.NavigateTo(friendsPage.Url);
                friendsPage.ClickApproveFriendshipIcon();
            }

            mainPage.ClickLogout();
            mainPage.NavigateTo(loginPage.Url);
            loginPage.LoginUser(TelerikUser.Related1);
        }
Ejemplo n.º 2
0
        public void ThisTestInitialize()
        {
            this.mainPage = new MainPage(this.Browser);
            this.loginPage = new LoginPage(this.Browser);
            this.userPage = new UserProfilePage(this.Browser);
            this.friendsPage = new FriendsPage(this.Browser);

            this.mainPage.NavigateTo(this.loginPage.Url);
        }