Beispiel #1
0
        public void GivenThePlayerIsOnThePage(string pageName)
        {
            string currentUrl = _driver.Url;

            try
            {
                if (!currentUrl.Contains(URL_SUPERBET, StringComparison.OrdinalIgnoreCase))
                {
                    _navigationObject.NavigateToHomePage();
                }

                if (!pageName.ToUpper().Equals(URL_SUPERBET, StringComparison.OrdinalIgnoreCase))
                {
                    _navigationObject.NavigateToMainPage(pageName);
                }
            }
            catch (Exception e) { Assert.Fail($"Step 'the player is on the page {pageName}' failed! {e.Message}"); }
        }
Beispiel #2
0
        public void GivenThePlayerIsLoggedIn()
        {
            try
            {
                _navigationObject.NavigateToHomePage();
                _playerSessionObject.OpenLoginModal();
                _playerSessionObject.Login();
                _driver.WdFindElement(NavigationHeaderLOC.SuperbetLogo);

                Assert.IsTrue(_playerSessionObject.IsThePlayerLoggedIn(), "Player login failed!");
                _playerBalance.BalanceAfterLogin = _cookieManager.GetPlayerBalance();

                if (_driver.WdIsElementVisible(PopUpModals.ButtonAcceptCookies, 2))
                {
                    _driver.WdFindElement(PopUpModals.ButtonAcceptCookies).Click();
                }
            }
            catch (Exception e) { Assert.Fail($"Step 'the player is logged in' failed! {e.Message}"); }
        }