public void RegistrationNewUser_UAE_Score4(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 = "Master’s Degree or equivalent"; //Financial Information dataStep2.CmbAnnualIncome = "> $1,000,000"; dataStep2.CmbEstimatedNetWorth = "> $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 = "2,000 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 page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //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); PageRregisterStep3 pageRregisterStep3 = new PageRregisterStep3(ngWebDriver, lng); Assert.AreEqual(@"I am aware that trading leveraged products might result in losing all invested capital. I also understand that based on my experience and the responses I have provided in the appropriateness test, I may benefit from learning more about trading CFDs and the risks involved, and wish to proceed with opening a real trading account.", pageRregisterStep3.LblSubmissionRiskAwareness.Text); pageRregisterStep3.BtnComplete.Click(); PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); }
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 RegistrationNewUser_UAE_OtherFields(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 = "Other"; dataStep2.TxtEmploymentOther = "Other-industry"; dataStep2.CmbLevelOfEducation = "High School"; //Financial Information dataStep2.CmbAnnualIncome = "> $1,000,000"; dataStep2.CmbEstimatedNetWorth = "$1,000,000 – $5,000,000"; dataStep2.CmbSourceOfIncome = "Other"; dataStep2.TxtSourceOfIncomeOther = "Other-Source-of-Wealth"; 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 page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //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); }
public void TradingExperienceChekboxes(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 = false; dataStep2.ChkIRegularlyMonitorNews = false; dataStep2.ChkIHaveReadMaterialOnTrading = false; 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; #endregion //Login page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //Registration Step 0 RegistrationHelper.RegistrationStep0(ngWebDriver, dataStep0, lng); //Registration Step 1 RegistrationHelper.RegistrationStep1(ngWebDriver, dataStep1, lng); //Registration Step 2 RegistrationHelper.RegistrationStep2(ngWebDriver, dataStep2, lng); PageRregisterStep2 pageRregisterStep2 = new PageRregisterStep2(ngWebDriver, lng); //Сhecking after clicking button NO (All = false) pageRregisterStep2.CmbTradingExperience.SetValueAfterClick("No"); //Test ChkHaveRelevantEducational pageRregisterStep2.ChkHaveRelevantEducational.Click(); Assert.IsTrue(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkHaveRelevantEducational.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); //Test ChkIRegularlyMonitorNews pageRregisterStep2.ChkIRegularlyMonitorNews.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsTrue(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkIRegularlyMonitorNews.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); //Test ChkIHaveReadMaterialOnTrading pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsTrue(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); //Test ChkAllOfAbove pageRregisterStep2.ChkAllOfAbove.Click(); Assert.IsTrue(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsTrue(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsTrue(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsTrue(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); //Test ChkNoneOfAbove pageRregisterStep2.ChkNoneOfAbove.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsTrue(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkAllOfAbove.Click(); pageRregisterStep2.ChkHaveRelevantEducational.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsTrue(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsTrue(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkAllOfAbove.Click(); pageRregisterStep2.ChkIRegularlyMonitorNews.Click(); Assert.IsTrue(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsTrue(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkAllOfAbove.Click(); pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Click(); Assert.IsTrue(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsTrue(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkNoneOfAbove.Click(); pageRregisterStep2.ChkHaveRelevantEducational.Click(); Assert.IsTrue(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); Assert.IsTrue(pageRregisterStep2.BtnNexStep.Enabled); pageRregisterStep2.ChkNoneOfAbove.Click(); pageRregisterStep2.ChkIRegularlyMonitorNews.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsTrue(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsFalse(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); pageRregisterStep2.ChkNoneOfAbove.Click(); pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Click(); Assert.IsFalse(pageRregisterStep2.ChkHaveRelevantEducational.Selected); Assert.IsFalse(pageRregisterStep2.ChkIRegularlyMonitorNews.Selected); Assert.IsTrue(pageRregisterStep2.ChkIHaveReadMaterialOnTrading.Selected); Assert.IsFalse(pageRregisterStep2.ChkAllOfAbove.Selected); Assert.IsFalse(pageRregisterStep2.ChkNoneOfAbove.Selected); }
public void ReasonForOpeningAccountChekboxes(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; #endregion //Login page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //Регистрация Шаг0 RegistrationHelper.RegistrationStep0(ngWebDriver, dataStep0, lng); //Registration Step 1 RegistrationHelper.RegistrationStep1(ngWebDriver, dataStep1, lng); //Registration Step 2 PageRregisterStep2 pageRregisterStep2 = new PageRregisterStep2(ngWebDriver, lng); Assert.AreEqual(pageRregisterStep2.ExpectedUrl, ngWebDriver.Url); ; //What is the reason you want to open an account with FxPro? Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); pageRregisterStep2.ChkToTradeCFDs.Click(); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); pageRregisterStep2.ChkToTradeCFDs.Click(); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); pageRregisterStep2.ChkToTradeCFDsOnForex.Click(); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); pageRregisterStep2.ChkToTradeCFDsOnShares.Click(); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsFalse(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); pageRregisterStep2.ChkToTradeCFDsOnIndices.Click(); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDs.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnForex.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnShares.Selected); Assert.IsTrue(pageRregisterStep2.ChkToTradeCFDsOnIndices.Selected); }
public void Partner_UAE_No_No_No(string lng) { #region Test Data var goodPartner1Name = "good_partner1"; var goodPartner1Id = "0808331"; var goodPartner2Name = "good_partner2"; var goodPartner2Id = "0808332"; var goodPartner3MenaName = "good_partner3"; var goodPartner3MenaId = "0808333"; var goodPartner3GmName = "good_partner3"; var goodPartner3GmId = "0808334"; 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 page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //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); //null //without partner; Jurisdiction = mena; Country = UAT; default; default pageTradingAccountsReal.LnkCreateNewAccount.Click(); PageCreateRealAccount pageCreateRealAccount = new PageCreateRealAccount(ngWebDriver, lng); pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount); //NO pageCreateRealAccount.CmbSelectAccountType.GetValuesList().Should().BeEquivalentTo(new[] { "cTrader", "MT4", "MT5" }); pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(0); pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(new[] { "EUR", "GBP", "USD" }); //0808331 //good_partner1; Jurisdiction = mena; Country = all; mt4m, xtrader; EUR, USD pageTradingAccountsReal.GoToPage(pageTradingAccountsReal.BaseUrl + "/partner/" + goodPartner1Id); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); pageTradingAccountsReal.LnkCreateNewAccount.Click(); pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount); //YES Assert.AreEqual(goodPartner1Name, pageCreateRealAccount.CmbSelectPartnership.GetValue()); pageCreateRealAccount.CmbSelectAccountType.GetValuesList().Should().BeEquivalentTo(new[] { "MT4", "cTrader" }); pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(0); pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(new[] { "EUR", "USD" }); Thread.Sleep(3000); //0808332 //good_partner2; Jurisdiction = gm; Country = other; default; default pageTradingAccountsReal.GoToPage(pageTradingAccountsReal.BaseUrl + "/partner/" + goodPartner2Id); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); pageTradingAccountsReal.LnkCreateNewAccount.Click(); pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount); //NO pageCreateRealAccount.CmbSelectAccountType.GetValuesList().Should().BeEquivalentTo(new[] { "cTrader", "MT4", "MT5" }); pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(0); pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(new[] { "EUR", "GBP", "USD" }); Thread.Sleep(3000); //0808333 //goodPartner3Mena; Jurisdiction = mena; Country = UAE; xtrader; GBP pageTradingAccountsReal.GoToPage(pageTradingAccountsReal.BaseUrl + "/partner/" + goodPartner3MenaId); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); pageTradingAccountsReal.LnkCreateNewAccount.Click(); pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount); //YES Assert.AreEqual(goodPartner3MenaName, pageCreateRealAccount.CmbSelectPartnership.GetValue()); pageCreateRealAccount.CmbSelectAccountType.GetValuesList().Should().BeEquivalentTo(new[] { "cTrader" }); pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(0); pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(new[] { "GBP" }); Thread.Sleep(3000); //0808334 //goodPartner3Gm; Jurisdiction = mena; Country = UAE; default; default pageTradingAccountsReal.GoToPage(pageTradingAccountsReal.BaseUrl + "/partner/" + goodPartner3GmId); pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal); pageTradingAccountsReal.LnkCreateNewAccount.Click(); pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount); //NO pageCreateRealAccount.CmbSelectAccountType.GetValuesList().Should().BeEquivalentTo(new[] { "cTrader", "MT4", "MT5" }); pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(0); pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(new[] { "EUR", "GBP", "USD" }); }
public void RegistrationNewUser_Thai_No_No(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 = "******"TestNameThailand"; dataStep0.TxtLastName = "TestLastNameThailand"; dataStep0.CmbCountry = "Thailand"; dataStep0.BtnNexStep = true; DataStep1 dataStep1 = new DataStep1(); dataStep1.TxtAddress = "Walking Street 1"; dataStep1.TxtPostcode = "1234567890"; dataStep1.TxtCity = "Muang Pattaya"; dataStep1.TxtBirthdate = "01/01/1990"; dataStep1.TxtPhone = "66000000000"; dataStep1.CmbNationality = "Thailand"; 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; //Trading Experience dataStep2.CmbTradingExperience = "No"; dataStep2.ChkHaveRelevantEducational = true; dataStep2.ChkIRegularlyMonitorNews = true; dataStep2.ChkIHaveReadMaterialOnTrading = true; dataStep2.BtnNexStep = true; DataStep3 dataStep3 = new DataStep3(); dataStep3.CmbAccountType = "MT5"; dataStep3.CmbLeverage = "1:50"; 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 page PageLogin pageLogin = new PageLogin(ngWebDriver, lng); pageLogin.GoToPage(pageLogin.ExpectedUrl); Assert.AreEqual(pageLogin.ExpectedUrl, ngWebDriver.Url); pageLogin.LnkCreateAnAccount.Click(); ngWebDriver.WaitForAngular(); //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); }