public void Verify_SignUpDeposit_bonus_Satisfies() { #region Declaration Registration_Data regData = new Registration_Data(); IMS_Base baseIMS = new IMS_Base(); IMS_AdminSuite.Common commIMS = new IMS_AdminSuite.Common(); Ladbrokes_IMS_TestRepository.Common commTest = new Ladbrokes_IMS_TestRepository.Common(); MyAcct_Data acctData = new MyAcct_Data(); AccountAndWallets AnW = new AccountAndWallets(); #endregion #region DriverInitiation IWebDriver driverObj; ISelenium iBrowser = commonFramework.GetDriverByTestCaseName(SeleniumContainer, Gallio.Framework.TestContext.CurrentContext.Test.Name); driverObj = browserInitialize(iBrowser, FrameGlobals.VegasURL); #endregion try { AddTestCase("Create customer from Playtech pages", "Customer should be created."); regData.update_Registration_Data(ReadxmlData("regdata", "Fname", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "country_UK", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "City_Web", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "Password", DataFilePath.Accounts_Wallets)); wAction._Click(driverObj, ICE.ObjectRepository.ORFile.Accounts_Wallets_Registration, wActions.locatorType.xpath, "createAcct_Xpath", "Find Address button not found", 0, false); string portalWindow = driverObj.WindowHandles.ToArray()[0].ToString(); commonWebMethods.WaitAndMovetoPopUPWindow(driverObj, driverObj.WindowHandles.ToArray()[1].ToString(), "Unable to locate registration page"); // AnW.Registration_PlaytechPages(driverObj, ref regData,0,false, ReadxmlData("bonus", "regProm", DataFilePath.Accounts_Wallets)); commTest.PP_Registration(driverObj, ref regData, ReadxmlData("bonus", "regProm", DataFilePath.Accounts_Wallets)); wAction.WaitAndMovetoFrame(driverObj, By.Id(Reg_Control.CashierFrame_ID), null, 10); Pass("Customer registered succesfully"); WriteCommentToMailer("UserName: "******";\nPassword: "******"Username:"******" Password:"******""); Pass(); wAction.WaitAndMovetoFrame(driverObj, By.Id(Reg_Control.CashierFrame_ID), null, 10); BaseTest.AddTestCase("Verify if new customers get bonus on Register (with promo Code) -> First Deposit if condition satisfies.", "First deposit should be successful"); // driverObj.SwitchTo().Window(driverObj.WindowHandles.ToArray()[1].ToString()); BaseTest.Assert.IsTrue(AnW.Verify_FirstCashier_Neteller(driverObj, ReadxmlData("netdata", "account_id", DataFilePath.Accounts_Wallets), ReadxmlData("netdata", "account_pwd", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "depoWallet", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "bonusWallet", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "depoAmnt", DataFilePath.Accounts_Wallets)), "Bonus amount not added to: " + ReadxmlData("bonus", "bonusWallet", DataFilePath.Accounts_Wallets)); BaseTest.Pass("Bonus amount added & successfully verified"); } catch (Exception e) { exceptionStack(e); CaptureScreenshot(driverObj, "Portal"); Fail("Verify_SignUpDeposit_bonus_Satisfies - failed"); } }
public void DepositRestrictTelebet(IWebDriver tb2Driver, MyAcct_Data acctData, string netAcc, string error, string site = null) { BaseTest.AddTestCase("Verify the customer is able to perform withdraw and not deposit", "Deposit should not be successfull"); AccountAndWallets anw = new AccountAndWallets(); String portalWindow = tb2Driver.WindowHandles.ToArray()[0].ToString(); wAction.Click(tb2Driver, By.Id("deposit_tab_list_item"), "Deposit link not found"); System.Threading.Thread.Sleep(3000); wAction.WaitAndMovetoFrame(tb2Driver, By.Id("acctIframe")); Framework.BaseTest.Assert.IsTrue(common.CommonWithdraw_Netteller_PT(tb2Driver, acctData, acctData.depositAmt, false, false, "Games"), "Amount not deducted after withdraw"); #region Deposit // tb2Driver.SwitchTo().Window(tb2Driver.WindowHandles.ToArray()[1].ToString()); wAction._Click(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.xpath, "DepositTab", "Deposit Tab not found", 0, false); BaseTest.AddTestCase("Verify that Payment method is added to the customer but cannot deposit", "The customer should have the payment option added to it but gets error msg during deposit"); wAction.WaitAndMovetoFrame(tb2Driver, By.Id("acctIframe")); String nettellerImg = "//table[contains(@class,'data')]//tbody[contains(@id,'accounts')]//td[contains(text(),'" + netAcc + "')]"; wAction.Click(tb2Driver, By.XPath(nettellerImg), "Netteller Image not found", 0, false); wAction._Type(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.id, "NettellerPwd_txt", acctData.card, "Net teller Security Text not found", FrameGlobals.reloadTimeOut, false); wAction._Clear(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.id, "Amount_txt", "Amount_txt not found"); wAction._Type(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.id, "Amount_txt", acctData.depositAmt, "Amount_txt not found"); wAction._SelectDropdownOption_ByPartialText(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.id, "sourceWallet_cmb", acctData.depositWallet, "sourceWallet_cmb not found"); System.Threading.Thread.Sleep(TimeSpan.FromSeconds(2)); wAction._Click(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.xpath, "deposit_btn", "deposit_btn not found"); BaseTest.Assert.IsTrue(wAction.GetText(tb2Driver, By.XPath("id('globalErrors')//span"), "Restrict message not found", false).Contains(error), "Restrict login error message is incorrect"); BaseTest.Pass(); #endregion BaseTest.Pass(); }
public void ValidateHTTPSTelebet(IWebDriver tb2Driver) { BaseTest.AddTestCase("Customer should be taken to HTTPS page on accessing any page from Telebet having sensitive data", "Sensitive page should not be having HTTPS"); AccountAndWallets anw = new AccountAndWallets(); String portalWindow = tb2Driver.WindowHandles.ToArray()[0].ToString(); wAction.Click(tb2Driver, By.Id("deposit_tab_list_item"), "Deposit link not found"); System.Threading.Thread.Sleep(3000); wAction.WaitAndMovetoFrame(tb2Driver, By.Id("acctIframe")); BaseTest.Assert.IsTrue(wAction._IsElementPresent(tb2Driver, ORFile.Accounts_Wallets_Banking, wActions.locatorType.xpath, "WithdrawTab"), "Cashier page not loaded"); BaseTest.Assert.IsTrue(tb2Driver.Url.Contains("https"), "URL is not HTTPS when accessing deposit page:" + tb2Driver.Url); tb2Driver.SwitchTo().DefaultContent(); wAction.Click(tb2Driver, By.LinkText("Account Overview"), "Account Overview link not found"); BaseTest.Assert.IsTrue(tb2Driver.Url.Contains("https"), "URL is not HTTPS when accessing My ACct page:" + tb2Driver.Url); BaseTest.Pass(); }
public void Verify_SportsFreeBet_bonus_notsatisfies_Ecom() { #region Declaration Registration_Data regData = new Registration_Data(); IMS_Base baseIMS = new IMS_Base(); IMS_AdminSuite.Common commIMS = new IMS_AdminSuite.Common(); Ladbrokes_IMS_TestRepository.Common commTest = new Ladbrokes_IMS_TestRepository.Common(); MyAcct_Data acctData = new MyAcct_Data(); AccountAndWallets AnW = new AccountAndWallets(); #endregion #region DriverInitiation IWebDriver driverObj; ISelenium iBrowser = commonFramework.GetDriverByTestCaseName(SeleniumContainer, Gallio.Framework.TestContext.CurrentContext.Test.Name); driverObj = browserInitialize(iBrowser, FrameGlobals.EcomURL); #endregion try { AddTestCase("Create customer from Playtech pages", "Customer should be created."); regData.update_Registration_Data(ReadxmlData("regdata", "Fname", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "country_UK", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "City_Web", DataFilePath.Accounts_Wallets), ReadxmlData("regdata", "Password", DataFilePath.Accounts_Wallets)); wAction._Type(driverObj, ICE.ObjectRepository.ORFile.Accounts_Wallets_Registration, wActions.locatorType.xpath, "Join_Ecom_Btn", Keys.Enter, "Join button not found", 0, false); string portalWindow = driverObj.WindowHandles.ToArray()[0].ToString(); commonWebMethods.WaitAndMovetoPopUPWindow(driverObj, driverObj.WindowHandles.ToArray()[1].ToString(), "Unable to locate registration page"); // AnW.Registration_PlaytechPages(driverObj, ref regData,0,false, ReadxmlData("bonus", "regProm", DataFilePath.Accounts_Wallets)); commTest.PP_Registration(driverObj, ref regData, ReadxmlData("bonus", "betProm", DataFilePath.Accounts_Wallets)); Pass("Customer registered succesfully"); WriteCommentToMailer("UserName: "******";\nPassword: "******"Username:"******" Password:"******""); Pass(); BaseTest.AddTestCase("Verify if new customers get bonus on Register (with promo Code) -> First Deposit if condition satisfies.", "First deposit should be successful"); // driverObj.SwitchTo().Window(driverObj.WindowHandles.ToArray()[1].ToString()); BaseTest.Assert.IsTrue(AnW.Verify_FirstCashier_Neteller(driverObj, ReadxmlData("netdata", "account_id", DataFilePath.Accounts_Wallets), ReadxmlData("netdata", "account_pwd", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "depoWallet", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "depoWallet", DataFilePath.Accounts_Wallets), ReadxmlData("bonus", "betDepAmt", DataFilePath.Accounts_Wallets)), "Depositted amount not added to: " + ReadxmlData("bonus", "depoWallet", DataFilePath.Accounts_Wallets)); Pass(); driverObj.Close(); driverObj.SwitchTo().Window(portalWindow); //switch to main window string eventName = ReadxmlData("eventdata", "eventID", DataFilePath.Accounts_Wallets); string oddValue = ReadxmlData("bonus", "selectionOdd_Negative", DataFilePath.Accounts_Wallets); string stake = ReadxmlData("bonus", "stake_Negative", DataFilePath.Accounts_Wallets); string bonusname = ReadxmlData("bonus", "betBonus", DataFilePath.Accounts_Wallets); string bonusvalue = ReadxmlData("bonus", "bet_value", DataFilePath.Accounts_Wallets); AnW.SearchEvent(driverObj, eventName); AnW.AddToBetSlipPlaceBet_selection(driverObj, oddValue, stake); AddTestCase("Verify whether freebet is triggered?", "Freebet should not be triggered"); wAction._Click(driverObj, ORFile.Betslip, wActions.locatorType.xpath, "Close_Receipt", "close receipt button not found", 0, false); BaseTest.Assert.IsFalse(wAction.IsElementPresent(driverObj, By.XPath("//label[contains(text(),'£" + bonusvalue + " - " + bonusname + "')]")), "Freebet has triggered after placebet"); Pass(); Pass("Bonus amount added & successfully verified"); } catch (Exception e) { exceptionStack(e); CaptureScreenshot(driverObj, "Portal"); Fail("Verify_SportsFreeBet_bonus_notsatisfies_Ecom - failed"); } }