public void RegistrationsLinks(string lng) { #region Test Data var randomPart = RegistrationHelper.GetRandomNumberPhone(new Random(), 6); DataStep0 dataStep0 = new DataStep0(); dataStep0.TxtEmail = randomPart + "@testing.test"; Log.Info("Email new user = "******"******"; Log.Info("Password new user = "******"TestNameUAE"; dataStep0.TxtLastName = "TestLastNameUAE"; dataStep0.CmbCountry = "United Arab Emirates"; dataStep0.BtnNexStep = true; #endregion //Before fill step 0 //login PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); pageLogin.WaitLoadPage(pageLogin); //register step 0 PageRegister pageRegister = new PageRegister(ngWebDriver, lng); pageRegister.GoToPage(pageRegister.ExpectedUrl); pageRegister.WaitLoadPage(pageRegister); //register step 1 PageRregisterStep1 pageRregisterStep1 = new PageRregisterStep1(ngWebDriver, lng); pageRregisterStep1.GoToPage(pageRregisterStep1.ExpectedUrl); pageRregisterStep1.WaitLoadPage(pageRegister, 1000); //register step 2 PageRregisterStep2 pageRregisterStep2 = new PageRregisterStep2(ngWebDriver, lng); pageRregisterStep2.GoToPage(pageRregisterStep2.ExpectedUrl); pageRregisterStep2.WaitLoadPage(pageRegister, 1000); //register step 3 PageRregisterStep3 pageRregisterStep3 = new PageRregisterStep3(ngWebDriver, lng); pageRregisterStep3.GoToPage(pageRregisterStep3.ExpectedUrl); pageRregisterStep3.WaitLoadPage(pageRegister, 1000); //redirect /register/thankyou to pageLogin PageThankYou pageThankYou = new PageThankYou(ngWebDriver, lng); pageThankYou.GoToPage(pageThankYou.ExpectedUrl); pageThankYou.WaitLoadPage(pageRegister, 1000); //After fill step 0 (page pageRegister not available) //login pageLogin.GoToPage(pageLogin.ExpectedUrl); pageLogin.WaitLoadPage(pageLogin); pageLogin.LnkCreateAnAccount.Click(); pageRegister.WaitLoadPage(pageRegister); //Registration Step 0 RegistrationHelper.RegistrationStep0(ngWebDriver, dataStep0, lng); pageRregisterStep1.WaitLoadPage(pageRregisterStep1); //register step 0 pageRegister.GoToPage(pageRegister.ExpectedUrl); pageRegister.WaitLoadPage(pageRregisterStep1, 1000); //register step 1 pageRregisterStep1.GoToPage(pageRregisterStep1.ExpectedUrl); pageRregisterStep1.WaitLoadPage(pageRregisterStep1); //register step 2 pageRregisterStep2.GoToPage(pageRregisterStep2.ExpectedUrl); pageRregisterStep2.WaitLoadPage(pageRregisterStep1, 1000); //register step 3 pageRregisterStep3.GoToPage(pageRregisterStep3.ExpectedUrl); pageRregisterStep3.WaitLoadPage(pageRregisterStep1, 1000); //redirect /register/thankyou to register/step1 pageThankYou.WaitLoadPage(pageRregisterStep1); }
public void BadPartnerLinkRegistrationNewUser(string lng) { #region Test Data var randomPart = RegistrationHelper.GetRandomNumberPhone(new Random(), 6); DataStep0 dataStep0 = new DataStep0(); dataStep0.TxtEmail = randomPart + "@testing.test"; Log.Info("Email new user = "******"******"; Log.Info("Password new user = "******"TestNameUAE"; dataStep0.TxtLastName = "TestLastNameUAE"; dataStep0.CmbCountry = "United Arab Emirates"; dataStep0.BtnNexStep = true; DataStep1 dataStep1 = new DataStep1(); dataStep1.TxtAddress = "Al Safa Street 1"; dataStep1.TxtCity = "Dubai"; dataStep1.CmbEmirate = "Dubai"; dataStep1.TxtBirthdate = "01/01/1990"; dataStep1.TxtPhone = "971500000000"; dataStep1.CmbNationality = "United Arab Emirates"; dataStep1.BtnNexStep = true; DataStep2 dataStep2 = new DataStep2(); //Employment Information dataStep2.CmbEmployment = "Employed"; dataStep2.CmbEmploymentType = "Financial Services"; dataStep2.CmbLevelOfEducation = "High School"; //Financial Information dataStep2.CmbAnnualIncome = "> $1,000,000"; dataStep2.CmbEstimatedNetWorth = "$1,000,000 – $5,000,000"; dataStep2.CmbSourceOfIncome = "Savings / Investments"; dataStep2.CmbDeposit = "> $1,000,000"; dataStep2.ChkToTradeCFDs = true; dataStep2.UsCitizen = new DataStep2.DataUsCitizen(btnUScitizen: false); //Trading Experience dataStep2.CmbTradingExperience = "No"; dataStep2.ChkHaveRelevantEducational = true; dataStep2.ChkIRegularlyMonitorNews = true; dataStep2.ChkIHaveReadMaterialOnTrading = true; dataStep2.CmbQuestion1 = "500 EUR"; dataStep2.CmbQuestion2 = "A take profit order"; dataStep2.CmbQuestion3 = "1:50"; dataStep2.ChkProfessionalClientYes = true; dataStep2.CmbLeveragedProductExperience = "Other"; dataStep2.TxtLeveragedProductExperienceOther = "I am good"; dataStep2.BtnNexStep = true; DataStep3 dataStep3 = new DataStep3(); dataStep3.CmbAccountType = "MT4"; dataStep3.CmbCurrencyBase = "EUR"; dataStep3.BtnVerifyYourProfileNo = true; dataStep3.ChkReceiveCompanyNews = true; dataStep3.ChkReceiveTechnicalAnalysis = true; dataStep3.ChkAcceptRisks = true; dataStep3.CmbLanguage = "English"; dataStep3.ChkClientAgreement = true; dataStep3.BtnComplete = true; #endregion //Login Register PageRegister pageRegister = new PageRegister(ngWebDriver, lng); //Partner ups-0123456789 is not exist pageRegister.GoToPage(pageRegister.BaseUrl + "/partner/ups1234567890"); pageRegister.WaitLoadPage(pageRegister); //Registration Step 0 RegistrationHelper.RegistrationStep0(ngWebDriver, dataStep0, lng); //Registration Step 1 RegistrationHelper.RegistrationStep1(ngWebDriver, dataStep1, lng); //Registration Step 2 RegistrationHelper.RegistrationStep2(ngWebDriver, dataStep2, lng); //Registration Step 3 RegistrationHelper.RegistrationStep3(ngWebDriver, dataStep3, lng); PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); }