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}"); }
        }
        public void GivenThePlayerHasAddedLottoSelectionToTheBetslip(int numberOfEventsToAdd)
        {
            if (numberOfEventsToAdd <= 0)
            {
                Assert.Fail("Number of events to add must be greater than zero!");
            }

            try
            {
                _navigationObject.NavigateToMainPage(LOTTO);
                _lottoBettingObject.AddLottoSelectionsToBetslip(numberOfEventsToAdd);
            }
            catch (Exception e)
            {
                Assert.Fail($"Step 'the player has added {numberOfEventsToAdd} Lotto selection to the Betslip' failed! {e.Message}");
            }
        }