Exemple #1
0
        public void BuyOnlineGame()
        {
            try
            {
                #region TestData
                var _testCaseName  = MethodBase.GetCurrentMethod().Name;
                var _worksheetName = GetType().Name;
                int x        = 20;
                var _quntity = ExcelDataParser.GetValueOf(GameDetailsColumns.quantity, _testCaseName, _worksheetName);

                #endregion

                _test = _extent.CreateTest(TestContext.CurrentContext.Test.Name, "BuyOnlineGame");
                _test.Log(Status.Info, "Konakart home page is loaded");

                //Steps
                _homePage.ClickOnGamesBtn();
                // _homePage.MoveRightSliderToSpecificPrice(x);
                _homePage.SelectLastGameIsListAndAddItToCart();
                _homePage.HoverOnShoppingMenuItem();
                if (!_homePage.VerifyGameIsAddedToShoppingBag())
                {
                    _test.Log(Status.Warning, "The item is not added to the shopping bag");
                }
                _homePage.ClickOnLastGameInList();
                if (!_gameDetailsPage.VerifyGameName())
                {
                    _test.Log(Status.Warning, "The name of the game in the details page isn't equal to the game in the home page");
                }
                if (!_gameDetailsPage.VerifyTheGameHasFourDifferentScreenshots())
                {
                    _test.Log(Status.Warning, "The game doesn't have 4 different screenshots");
                }

                _gameDetailsPage.SelectTwoItemsFromTheQuantityDdl(_quntity);
                _gameDetailsPage.ClickOnAddToCartBtn();
                if (!_homePage.VerifyGameIsAddedToShoppingBag())
                {
                    _test.Log(Status.Warning, "The items are not added to the shopping bag");
                }


                //if (_FindPage.GetVcRequestStatus().Equals(RequestStatus.VcSubmittedStatus))
                //{
                //    _FindPage.OpenVcDetails();
                //    if (_FindPage.GetGsRequestStatus().Equals(RequestStatus.VcSubmittedStatus))
                //    {
                //        _test.Pass(TestContext.CurrentContext.Test.Name + "is passed ");
                //        Assert.IsTrue(true);
                //    }
                //}
                //_MenuHeaderPage.Logout();
            }
            catch (Exception e)
            {
                _test.Fail(TestContext.CurrentContext.Test.Name + " is failed ");
                _test.Log(Status.Fail, e.ToString());
                Assert.Fail(e.ToString());
            }
        }
 public void FillData(string sheetToGetDataFrom, string getDataFromRow)
 {
     dishOrder     = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Dishes");
     pizzaOrder    = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Pizza");
     drinkOrder    = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Drinks");
     mainDishDrink = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "MainDishDrink");
     orderComment  = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "OrderComment");
 }
Exemple #3
0
 public void FillData(string sheetToGetDataFrom, string getDataFromRow)
 {
     address      = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Address");
     town         = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Town");
     surname      = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Surname");
     emailaddress = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "EmailAddress");
     phoneNumber  = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "PhoneNumber");
 }
Exemple #4
0
        }//end method

        public static string GetShortDummyText()
        {
            //Get the current method name and current class name
            string methodName = "ShortDummyText";
            string sheetName  = "Shared";

            //Get the data from the excel sheet
            string text = ExcelDataParser.GetValueOf("Description", methodName, sheetName);

            return(text);
        } //end method
Exemple #5
0
        /// <summary>
        /// This functions gets text that exceeds max characters and creates a new protocol
        /// </summary>
        /// <returns></returns>
        public static string GetTextExceedingMaximumCharacters()
        {
            //Get the current method name and current class name
            string methodName = "TextArea_MaximumCharacters";
            string sheetName  = "Shared";

            //Get the data from the excel sheet
            string text = ExcelDataParser.GetValueOf("Description", methodName, sheetName);

            return(text);
        }//end method
Exemple #6
0
        public void Login()
        {
            LoginPage _LoginPage = new LoginPage(AutomatedBrowser.WebDriverInstance);

            //Prepare test data
            var _testCaseName  = MethodBase.GetCurrentMethod().Name;
            var _worksheetName = "LoginTest";
            var _username      = ExcelDataParser.GetValueOf(LoginPageColumns._userName, _testCaseName, _worksheetName);
            var _password      = ExcelDataParser.GetValueOf(LoginPageColumns._password, _testCaseName, _worksheetName);

            //Steps
            _LoginPage.Login(_username, _password);
        }
Exemple #7
0
 public void FillData(string sheetToGetDataFrom, string getDataFromRow)
 {
     emailAddress = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "EmailAddress");
     password     = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Password");
 }
Exemple #8
0
 public void FillData(string sheetToGetDataFrom, string getDataFromRow)
 {
     recipient = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Recipient");
     subject   = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Subject");
     body      = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "Body");
 }
        }                                                // this is the resturant or post code name



        public void FillData(string sheetToGetDataFrom, string getDataFromRow)
        {
            resturantName = ExcelDataParser.GetValueOf(sheetToGetDataFrom, getDataFromRow, "ResturantName");
        }