Example #1
0
            public void CreateCustomer_Romania_EUR()
            {
                #region DriverInitiation
                IWebDriver driverObj;
                ISelenium  iBrowser = commonFramework.GetDriverByTestCaseName(SeleniumContainer, Gallio.Framework.TestContext.CurrentContext.Test.Name);
                driverObj = browserInitialize(iBrowser, FrameGlobals.LiveDealerURL);
                #endregion
                Registration_Data regData = new Registration_Data();
                Ladbrokes_IMS_TestRepository.Common cmn = new Ladbrokes_IMS_TestRepository.Common();
                // Configuration testdata = TestDataInit();


                AddTestCase("Verify the customer registration from Plyatech pages.", "Customer should be created successfully");
                try
                {
                    //Updating customer details
                    regData.update_Registration_Data(ReadxmlData("regdata", "Fname", DataFilePath.Accounts_Wallets), "Romania", ReadxmlData("regdata", "City_Web", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "Password", DataFilePath.Accounts_Wallets));
                    regData.currency = "EUR";
                    regData.email    = "@aditi.com";
                    AnW.OpenRegistrationPage(driverObj);
                    //creating customer
                    AnW.Registration_PlaytechPages(driverObj, ref regData);
                    Pass("Customer registered succesfully");
                    //writing customer name in excel
                    WriteCommentToMailer("UserName: "******";\nPassword: "******"Username:"******" Password:"******"");
                    Pass();

                    //verifying currency of customer
                    AddTestCase("Verified the currency in the portal home page", "Appropriate Currency shoul be displayed in home page");
                    string bal = cmn.HomePage_Balance(driverObj);
                    if (!bal.Contains("€"))
                    {
                        Fail("Currency type is not correct for the customer registered");
                    }
                    Pass();
                }
                catch (Exception e)
                {
                    exceptionStack(e);
                    CaptureScreenshot(MyBrowser, "portal");
                    Fail("Customer Registration/Auto Login has failed");
                    Pass();
                }
            }