예제 #1
0
        public void MakeDepositPaysec(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "THB" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnPaysec.Click();

            PageDepositPaysec pageDepositPaysec = new PageDepositPaysec(webDriver, lng);

            pageDepositPaysec.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositPaysec.CmbCurrency.SetValueAfterClick(0);
            pageDepositPaysec.TxtSendAmount.SendKeys("3000");

            pageDepositPaysec.BtnDeposit.Click();

            //redirect to Paysec
            Thread.Sleep(10000);
            //Assert.IsTrue(webDriver.Url.Contains(@"https://sandbox.zotapay.com/paynet/processor/"));
        }
예제 #2
0
        public void CreateDemoAccount(string accountType, string lng)
        {
            #region Test Data

            #endregion

            LoginHelper.Login(webDriver, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);

            PageTradingAccountsDemo pageTradingAccountsDemo = new PageTradingAccountsDemo(webDriver, lng);

            pageTradingAccountsDemo.LnkDemoAccounts.Click();
            pageTradingAccountsDemo.LnkCreateNewAccount.Click();
            PageCreateDemoAccount pageCreateDemoAccount = new PageCreateDemoAccount(webDriver, lng);

            //take is count Account Currency Base
            pageCreateDemoAccount.CmbSelectAccountType.SetValueAfterClick(accountType);
            var countCurrency = pageCreateDemoAccount.CmbSelectCurrencyBase.Count();
            pageCreateDemoAccount.LnkBack.Click();

            for (int i = 0; i < countCurrency; i++)
            {
                pageTradingAccountsDemo.LnkCreateNewAccount.Click();
                pageCreateDemoAccount.CmbSelectAccountType.SetValueAfterClick(accountType);
                pageCreateDemoAccount.CmbSelectLeverage.SetValueAfterClick(0);
                pageCreateDemoAccount.CmbSelectCurrencyBase.SetValueAfterClick(i);
                pageCreateDemoAccount.TxtAmount.SendKeys("1000");
                pageCreateDemoAccount.BtnCreate.Click();
                Thread.Sleep(3000);
            }
        }
예제 #3
0
        public void MakeDepositZotapay(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "VND" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnZotapay.Click();

            PageDepositZotapay pageDepositZotapay = new PageDepositZotapay(webDriver, lng);

            pageDepositZotapay.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositZotapay.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositZotapay.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            pageDepositZotapay.TxtSendAmount.SendKeys("2000000");

            pageDepositZotapay.BtnDeposit.Click();

            //redirect to Zotapay
            //pageDepositZotapay.WaitLoadNoAngularPage(@"https://sandbox.zotapay.com/paynet/");
        }
예제 #4
0
        public void MakeDepositTFTpay(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnQuickDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);
            pageDeposit.BtnTft.Click();

            #region redirect to Tft
            var  mainWindow = webDriver.CurrentWindowHandle;
            bool popupShown = false;
            foreach (var window in webDriver.WindowHandles)
            {
                if (webDriver.SwitchTo().Window(window).Url == @"http://47.98.123.57:8080/fxpro/toView")
                {
                    webDriver.Close();
                    popupShown = true;
                    break;
                }
            }
            Assert.IsTrue(popupShown, "Pop up wasn't shown.");
            #endregion

            webDriver.SwitchTo().Window(mainWindow);
            //pageDeposit.WaitLoadPage();
        }
예제 #5
0
        public void MakeDepositNeteller(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "EUR", "GBP", "USD", "PLN", "JPY", "AUD" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnNeteller.Click();

            PageDepositNeteller pageDepositNeteller = new PageDepositNeteller(webDriver, lng);

            pageDepositNeteller.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositNeteller.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositNeteller.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            pageDepositNeteller.TxtSendAmount.SendKeys("3000");

            pageDepositNeteller.BtnDeposit.Click();

            //redirect to Neteller
            //pageDepositNeteller.WaitLoadNoAngularPage(@"https://test.api.neteller.com");
        }
예제 #6
0
        public void MakeDepositIngenico(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "EUR", "GBP", "USD", "PLN", "JPY", "AUD", "CHF" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnIngenico.Click();

            PageDepositIngenico pageDepositIngenico = new PageDepositIngenico(webDriver, lng);

            pageDepositIngenico.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositIngenico.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositIngenico.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            pageDepositIngenico.TxtSendAmount.SendKeys("10000");

            pageDepositIngenico.BtnDeposit.Click();

            //redirect to Ingenico
            //pageDepositIngenico.WaitLoadNoAngularPage(@"https://payment.pay1.preprod.secured-by-ingenico.com/checkout/select-payment-product/");
        }
예제 #7
0
        public void MakeDepositPayPal(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "EUR", "GBP", "USD", "PLN", "JPY", "AUD", "CHF" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnQuickDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnPayPal.Click();

            PageDepositPayPal pageDepositPayPal = new PageDepositPayPal(webDriver, lng);

            pageDepositPayPal.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositPayPal.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositPayPal.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            pageDepositPayPal.TxtSendAmount.SendKeys("10000");

            pageDepositPayPal.BtnDeposit.Click();

            //redirect to PayPal
            //pageDepositPayPal.WaitLoadNoAngularPage(@"https://www.sandbox.paypal.com/");
        }
예제 #8
0
        public void MakeDepositMyBitWallet(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "EUR", "USD", "JPY" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnMyBitWallet.Click();

            PageDepositMyBitWallet pageDepositMyBitWallet = new PageDepositMyBitWallet(webDriver, lng);

            pageDepositMyBitWallet.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositMyBitWallet.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositMyBitWallet.TxtEmail.SendKeys("*****@*****.**");
            pageDepositMyBitWallet.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            pageDepositMyBitWallet.TxtSendAmount.SendKeys("5000");

            pageDepositMyBitWallet.BtnDeposit.Click();

            //redirect to MyBitWallet
            //pageDepositMyBitWallet.WaitLoadNoAngularPage(@"https://devsecure.bitwallet.com/merchant/signin");
        }
예제 #9
0
        public void EditPersonalDetails(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMenuProfile.Click();
            pageTradingAccountsReal.LnkMenuMyProfile.Click();

            PageProfile pageProfile = new PageProfile(webDriver, lng);
            //pageTradingAccountsReal.WaitLoadPage(pageProfile);
            pageProfile.LnkEditPersonalDetails.Click();
            PageEditPersonalDetails pageEditPersonalDetails = new PageEditPersonalDetails(webDriver, lng);
            //pageEditPersonalDetails.WaitLoadPage(pageEditPersonalDetails);
            //check and save old values
            Assert.AreEqual("TestNameUAE", pageEditPersonalDetails.TxtFirstName.GetAttribute("value"));
            Assert.AreEqual("TestLastNameUAE", pageEditPersonalDetails.TxtLastName.GetAttribute("value"));
            Assert.AreEqual("+971-50-000-0000", pageEditPersonalDetails.TxtPhone.GetAttribute("value"));
            pageEditPersonalDetails.BtnSave.Click();
            //pageTradingAccountsReal.WaitLoadPage(pageProfile);

            pageProfile.LnkEditPersonalDetails.Click();
            //check old values
            Assert.AreEqual("TestNameUAE", pageEditPersonalDetails.TxtFirstName.GetAttribute("value"));
            Assert.AreEqual("TestLastNameUAE", pageEditPersonalDetails.TxtLastName.GetAttribute("value"));
            Assert.AreEqual("+971-50-000-0000", pageEditPersonalDetails.TxtPhone.GetAttribute("value"));

            //input new values
            pageEditPersonalDetails.TxtFirstName.Clear();
            pageEditPersonalDetails.TxtFirstName.SendKeys("newTestNameUAE");
            pageEditPersonalDetails.TxtLastName.Clear();
            pageEditPersonalDetails.TxtLastName.SendKeys("newTestLastNameUAE");
            pageEditPersonalDetails.TxtPhone.Clear();
            pageEditPersonalDetails.TxtPhone.SendKeys("+971-50-000-0001");
            pageEditPersonalDetails.BtnSave.Click();

            //check successfully message
            //pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            Assert.AreEqual("Your request was successfully received. We will review it and let you know about the results. If it is necessary, we will contact you for details.", pageTradingAccountsReal.MsgSuccess.Text);

            pageTradingAccountsReal.BtnMenuProfile.Click();
            pageTradingAccountsReal.LnkMenuMyProfile.Click();
            pageProfile.LnkEditPersonalDetails.Click();
            //pageEditPersonalDetails.WaitLoadPage(pageEditPersonalDetails);
            //check new values
            Assert.AreEqual("TestNameUAE", pageEditPersonalDetails.TxtFirstName.GetAttribute("value"));
            Assert.AreEqual("TestLastNameUAE", pageEditPersonalDetails.TxtLastName.GetAttribute("value"));
            Assert.AreEqual("+971-50-000-0000", pageEditPersonalDetails.TxtPhone.GetAttribute("value"));
        }
예제 #10
0
파일: Faq.cs 프로젝트: 232629/test
        public void Faq(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            Actions action  = new Actions(ngWebDriver);
            Actions action1 = new Actions(ngWebDriver.WrappedDriver);


            #endregion

            //Create user with account currency = 'currency'
            LoginHelper.Login(ngWebDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            pageTradingAccountsReal.LnkFaq.Click();

            PageFaq pageFaq = new PageFaq(ngWebDriver, lng);
            pageFaq.WaitLoadPage(pageFaq);

            pageFaq.WaitDisplayElements(pageFaq.LblVideo1);
            Assert.AreEqual("How to upload documents?", pageFaq.LblVideo1.Text);
            pageFaq.LblVideo1.Click();
            pageFaq.WaitDisplayElements(pageFaq.BtnCloseVideo1);
            Thread.Sleep(1000);
            pageFaq.BtnCloseVideo1.Click();


            pageFaq.WaitDisplayElements(pageFaq.LblVideo2);
            Assert.AreEqual("How to deposit by credit card?", pageFaq.LblVideo2.Text);
            pageFaq.LblVideo2.Click();
            pageFaq.WaitDisplayElements(pageFaq.BtnCloseVideo2);
            Thread.Sleep(1000);
            pageFaq.BtnCloseVideo2.Click();


            pageFaq.WaitDisplayElements(pageFaq.LblVideo3);
            Assert.AreEqual("How to deposit by Bank Wire?", pageFaq.LblVideo3.Text);
            pageFaq.LblVideo3.Click();
            pageFaq.WaitDisplayElements(pageFaq.BtnCloseVideo3);
            Thread.Sleep(1000);
            pageFaq.BtnCloseVideo3.Click();


            pageFaq.WaitDisplayElements(pageFaq.LblVideo4);
            Assert.AreEqual("How to create more accounts?", pageFaq.LblVideo4.Text);
            pageFaq.LblVideo4.Click();
            pageFaq.WaitDisplayElements(pageFaq.BtnCloseVideo4);
            Thread.Sleep(1000);
            pageFaq.BtnCloseVideo4.Click();
        }
예제 #11
0
        public void MakeDepositNganLuong(string lng, string paymentMethod)
        {
            #region Test Data

            string login        = "******";
            string pas          = "******";
            var    currencies   = new[] { "VND" };
            var    bankCodesIB  = new[] { "Vietcombank", "DongA Bank", "Techcombank", "BIDV", "ACB", "VietinBank" };
            var    bankCodesATM = new[] { "ACB", "Vietcombank", "DongA Bank", "Techcombank", "Military JSC Bank", "VIB", "VietinBank", "Eximbank", "HDBank", "MariTimeBank", "NaviBank", "VietA Bank", "VPBank", "Sacombank", "GPBank", "Agribank", "BIDV", "OceanBank", "PGBank", "SHB", "TienPhong Bank", "Nam A Bank", "Saigon Bank", "Bac A Bank" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);

            pageDeposit.BtnNganLuong.Click();

            PageDepositNganLuong pageDepositNganLuong = new PageDepositNganLuong(webDriver, lng);

            pageDepositNganLuong.CmbTradingAccountNumber.SetValueAfterClick(0);
            pageDepositNganLuong.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositNganLuong.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));

            if (paymentMethod == "ATM Online")
            {
                pageDepositNganLuong.CmbPaymentMethod.SetValueAfterClick("ATM Online");
                pageDepositNganLuong.CmbBankCode.GetValuesList().Should().BeEquivalentTo(bankCodesATM);
                pageDepositNganLuong.CmbBankCode.SetValueAfterClick(new Random().Next(bankCodesATM.Length));
            }

            if (paymentMethod == "Internet banking")
            {
                pageDepositNganLuong.CmbPaymentMethod.SetValueAfterClick("Internet banking");
                pageDepositNganLuong.CmbBankCode.GetValuesList().Should().BeEquivalentTo(bankCodesIB);
                pageDepositNganLuong.CmbBankCode.SetValueAfterClick(new Random().Next(bankCodesIB.Length));
            }

            if (paymentMethod == "NganLuong wallet")
            {
                pageDepositNganLuong.CmbPaymentMethod.SetValueAfterClick("NganLuong wallet");
            }

            pageDepositNganLuong.TxtSendAmount.SendKeys("2000000");

            pageDepositNganLuong.BtnDeposit.Click();

            //redirect to NganLuong
            //pageDepositNganLuong.WaitLoadNoAngularPage(@"https://sandbox.nganluong.vn:8088/");
        }
예제 #12
0
        public void CreateRealAccount(string accountType, string lng)
        {
            #region Test Data

            List <string> CurrencyList = new List <string>();
            switch (accountType)
            {
            case "MT4":
                CurrencyList.Add("EUR");
                CurrencyList.Add("GBP");
                CurrencyList.Add("USD");
                break;

            case "MT5":
                CurrencyList.Add("EUR");
                CurrencyList.Add("GBP");
                CurrencyList.Add("USD");
                break;

            case "cTrader":
                CurrencyList.Add("EUR");
                CurrencyList.Add("GBP");
                CurrencyList.Add("USD");
                break;

            default:
                break;
            }

            #endregion

            LoginHelper.Login(ngWebDriver, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            PageCreateRealAccount pageCreateRealAccount = new PageCreateRealAccount(ngWebDriver, lng);

            for (int i = 0; i < CurrencyList.Count; i++)
            {
                pageTradingAccountsReal.LnkCreateNewAccount.Click();
                pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount);
                pageCreateRealAccount.CmbSelectAccountType.SetValueAfterClick(accountType);
                pageCreateRealAccount.CmbSelectLeverage.SetValueAfterClick(0);
                //checking currencies' list
                pageCreateRealAccount.CmbSelectCurrencyBase.GetValuesList().Should().BeEquivalentTo(CurrencyList);
                pageCreateRealAccount.CmbSelectCurrencyBase.SetValueAfterClick(i);
                pageCreateRealAccount.BtnCreate.Click();
                pageCreateRealAccount.WaitLoadPage(pageTradingAccountsReal);
                Thread.Sleep(3000);
            }
        }
예제 #13
0
파일: Footer.cs 프로젝트: 232629/ShowTest
        //[Parallelizable(ParallelScope.None)]
        public void Footer(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            #endregion

            PageLogin pageLogin = new PageLogin(webDriver, lng);
            Assert.AreEqual("Trade Responsibly CFDs and Spread Betting are complex instruments and come with a high risk of losing money rapidly due to leverage. 79% of retail investor accounts lose money when trading CFDs and Spread Betting with this provider. You should consider whether you understand how CFDs and Spread Betting work and whether you can afford to take the high risk of losing your money. FxPro UK Limited is authorised and regulated by the Financial Conduct Authority (registration № 509956).", pageLogin.LblRisk.Text);

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Assert.AreEqual("Trade Responsibly CFDs and Spread Betting are complex instruments and come with a high risk of losing money rapidly due to leverage. 79% of retail investor accounts lose money when trading CFDs and Spread Betting with this provider. You should consider whether you understand how CFDs and Spread Betting work and whether you can afford to take the high risk of losing your money. FxPro UK Limited is authorised and regulated by the Financial Conduct Authority (registration № 509956).", pageTradingAccountsReal.LblRisk.Text);
        }
예제 #14
0
파일: Footer.cs 프로젝트: 232629/ShowTest
        public void Footer(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "THB" };

            #endregion

            PageLogin pageLogin = new PageLogin(webDriver, lng);
            Assert.AreEqual("Trade Responsibly: Trading CFDs involves significant risk of loss. Read FxPro\'s ‘Risk Disclosure Statement’. FxPro Global Markets Ltd is regulated by the SCB (license no. SIA-F184) and is part of FxPro Group Limited. Other subsidiaries of FxPro Group Limited are regulated by the CySEC, FCA and DFSA.", pageLogin.LblRisk.Text);

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Assert.AreEqual("Trade Responsibly: Trading CFDs involves significant risk of loss. Read FxPro\'s ‘Risk Disclosure Statement’. FxPro Global Markets Ltd is regulated by the SCB (license no. SIA-F184) and is part of FxPro Group Limited. Other subsidiaries of FxPro Group Limited are regulated by the CySEC, FCA and DFSA.", pageTradingAccountsReal.LblRisk.Text);
        }
예제 #15
0
파일: Footer.cs 프로젝트: 232629/ShowTest
        public void Footer(string lng)
        {
            #region Test Data 

            string login = "******";
            string pas = "******";

            #endregion

            PageLogin pageLogin = new PageLogin(webDriver, lng);
            Assert.AreEqual("Trade Responsibly: Trading CFDs involves significant risk of loss. Read FxPro\'s ‘Risk Disclosure Statement’. FxPro Global Markets MENA Limited is authorised and regulated by the Dubai Financial Services Authority (reference no. F003333).", pageLogin.LblRisk.Text);

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Assert.AreEqual("Trade Responsibly: Trading CFDs involves significant risk of loss. Read FxPro\'s ‘Risk Disclosure Statement’. FxPro Global Markets MENA Limited is authorised and regulated by the Dubai Financial Services Authority (reference no. F003333).", pageTradingAccountsReal.LblRisk.Text);
            
        }
예제 #16
0
        public void BankTransferDeposit(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "GBP", "USD" };

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnQuickDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);
            pageDeposit.BtnBankwire.Click();

            PageDepositBankWire pageDepositBankWire = new PageDepositBankWire(webDriver, lng);
            pageDepositBankWire.CmbAccountNumber.SetValueAfterClick(0);
            pageDepositBankWire.CmbBank.SetValueAfterClick("Emirates NBD");
            pageDepositBankWire.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);
            pageDepositBankWire.CmbCurrency.SetValueAfterClick(new Random().Next(currencies.Length));
            var currency = pageDepositBankWire.CmbCurrency.GetValue();
            pageDepositBankWire.BtnGetTransferDetails.Click();

            PageTransferInstructions pageTransferInstructions = new PageTransferInstructions(webDriver, lng);

            Assert.AreEqual("Beneficiary name", pageTransferInstructions.LblName(0).Text);
            Assert.AreEqual("Benificiary bank name", pageTransferInstructions.LblName(1).Text);
            Assert.AreEqual("Bank address", pageTransferInstructions.LblName(2).Text);
            Assert.AreEqual("SWIFT/BIC", pageTransferInstructions.LblName(3).Text);
            Assert.AreEqual("IBAN", pageTransferInstructions.LblName(4).Text);
            Assert.AreEqual("Payment details", pageTransferInstructions.LblName(5).Text);
            Assert.AreEqual("Currency", pageTransferInstructions.LblName(6).Text);

            Assert.AreEqual("FxPro Global Markets MENA Limited", pageTransferInstructions.LblValue(0).Text);
            Assert.AreEqual("Emirates NBD", pageTransferInstructions.LblValue(1).Text);
            Assert.AreEqual("P.O. Box 777 Baniyas Road, Dubai United Arab Emirates", pageTransferInstructions.LblValue(2).Text);
            Assert.AreEqual("EBILAEADXXX", pageTransferInstructions.LblValue(3).Text);
            Assert.IsTrue(pageTransferInstructions.LblValue(5).Text.Contains("FXPRO WALLET NUMBER:"));
            Assert.AreEqual(currency, pageTransferInstructions.LblValue(6).Text);
        }
예제 #17
0
        public void BankTransferDeposit(string currency, string lng)
        {
            #region Test Data

            #endregion

            //Create user with account currency = 'currency'
            LoginHelper.Login(ngWebDriver, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            pageTradingAccountsReal.BtnQuickDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(ngWebDriver, lng);
            pageDeposit.WaitLoadPage(pageDeposit);
            pageDeposit.BtnBankwire.Click();

            PageDepositBankWire pageDepositBankWire = new PageDepositBankWire(ngWebDriver, lng);
            pageDepositBankWire.WaitLoadPage(pageDepositBankWire);
            pageDepositBankWire.CmbAccountNumber.SetValueAfterClick(0);
            pageDepositBankWire.CmbBank.SetValueAfterClick(0);
            pageDepositBankWire.CmbCurrency.SetValueAfterClick(currency);
            pageDepositBankWire.BtnGetTransferDetails.Click();

            PageTransferInstructions pageTransferInstructions = new PageTransferInstructions(ngWebDriver, lng);
            pageTransferInstructions.WaitLoadPage(pageTransferInstructions);

            Assert.AreEqual("Beneficiary name", pageTransferInstructions.LblName(0).Text);
            Assert.AreEqual("Benificiary bank name", pageTransferInstructions.LblName(1).Text);
            Assert.AreEqual("Bank address", pageTransferInstructions.LblName(2).Text);
            Assert.AreEqual("SWIFT/BIC", pageTransferInstructions.LblName(3).Text);
            Assert.AreEqual("IBAN", pageTransferInstructions.LblName(4).Text);
            Assert.AreEqual("Payment details", pageTransferInstructions.LblName(5).Text);
            Assert.AreEqual("Currency", pageTransferInstructions.LblName(6).Text);

            Assert.AreEqual("FxPro Global Markets MENA Limited", pageTransferInstructions.LblValue(0).Text);
            Assert.AreEqual("Emirates NBD", pageTransferInstructions.LblValue(1).Text);
            Assert.AreEqual("P.O. Box 777 Baniyas Road, Dubai United Arab Emirates", pageTransferInstructions.LblValue(2).Text);
            Assert.AreEqual("EBILAEADXXX", pageTransferInstructions.LblValue(3).Text);
            Assert.IsTrue(pageTransferInstructions.LblValue(5).Text.Contains("FXPRO WALLET NUMBER:"));
            Assert.AreEqual(currency, pageTransferInstructions.LblValue(6).Text);
        }
예제 #18
0
        public void RestrictionCanDeposit(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            #endregion

            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnQuickDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(webDriver, lng);
            pageDeposit.BtnIngenico.Click();

            PageDepositIngenico pageDepositIngenico = new PageDepositIngenico(webDriver, lng);
            Assert.AreEqual("Dear Client,\r\n\r\nYou're unable to make a deposit at the moment. Please make sure you provided all necessary documents for profile verification. If your profile is already verified and the issue persists please contact our customer support for assistance.", pageDepositIngenico.LblWarning.Text);
        }
예제 #19
0
        public void MakeDepositIngenico(string lng)
        {
            #region Test Data

            string login      = "******";
            string pas        = "******";
            var    currencies = new[] { "EUR", "GBP", "USD" };

            #endregion

            //Create user with account currency = 'currency'
            LoginHelper.Login(ngWebDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            pageTradingAccountsReal.BtnMakeFirstDeposit.Click();

            PageDeposit pageDeposit = new PageDeposit(ngWebDriver, lng);
            pageDeposit.WaitLoadPage(pageDeposit);

            pageDeposit.BtnIngenico.Click();

            PageDepositIngenico pageDepositIngenico = new PageDepositIngenico(ngWebDriver, lng);
            pageDepositIngenico.WaitLoadPage(pageDepositIngenico);

            Assert.AreEqual("The minimum deposit accepted depends on the currency selected.\r\nThe maximum deposit accepted depends on the currency selected.", pageDepositIngenico.LblLimitation.Text);
            pageDepositIngenico.CmbCurrency.GetValuesList().Should().BeEquivalentTo(currencies);

            foreach (var currency in currencies)
            {
                pageDepositIngenico.CmbCurrency.SetValueAfterClick(currency);
                Assert.AreEqual("The minimum deposit amount accepted is 100 " + currency + ".\r\nThe maximum deposit amount accepted is 10000 " + currency + ".", pageDepositIngenico.LblLimitation.Text);
            }

            pageDepositIngenico.BtnDeposit.Click();
            //redirect to Ingenico
        }
예제 #20
0
        public void RegistrationNewUser_UAE_Score6(string lng)
        {
            #region Test Data

            var randomPart = RegistrationHelper.GetRandom(8);

            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 = "> $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.ChkAllOfAbove        = true;

            dataStep2.CmbQuestion1 = "2,000 EUR";
            dataStep2.CmbQuestion2 = "A stop loss order";
            dataStep2.CmbQuestion3 = "1:50";

            dataStep2.ChkProfessionalClientYes           = true;
            dataStep2.CmbLeveragedProductExperience      = "Other (please specify)";
            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(webDriver, lng);
            pageLogin.LnkRegister.Click();

            //Registration Step 0
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            PageRregisterStep3 pageRregisterStep3 = new PageRregisterStep3(webDriver, lng);
            Assert.AreEqual(@"I am aware that trading leveraged products might result in losing all invested capital.", pageRregisterStep3.LblSubmissionRiskAwareness.Text);
            pageRregisterStep3.BtnComplete.Click();

            PageThankYou pageThankYou = new PageThankYou(webDriver, lng);
            Wait.UrlContains(webDriver, pageThankYou.ExpectedUrl);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Wait.UrlContains(webDriver, pageTradingAccountsReal.ExpectedUrl);
        }
예제 #21
0
        public void LegalDocumentation(string lng)
        {
            #region Test Data

            #endregion

            //Create user
            LoginHelper.Login(ngWebDriver, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            pageTradingAccountsReal.BtnMenuProfile.Click();
            pageTradingAccountsReal.LnkMenuMyProfile.Click();

            PageProfile pageProfile = new PageProfile(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageProfile);
            pageProfile.LnkLegalDocumentation.Click();

            PageLegalDocumentation pageLegalDocumentation = new PageLegalDocumentation(ngWebDriver, lng);
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnClientAgreement.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Client_Agreement.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnClientAgreementAr.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Client_Agreement_ar.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnComplaintsHandlingProcedure.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Complaints_Handling_Procedure.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnOrderExecutionPolicy.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Order_Execution_Policy.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnOrderExecutionPolicyAr.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Order_Execution_Policy_ar.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnClientCategorisationNotice.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Client_Categorisation_Notice.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnConflictsOfInterestPolicy.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Conflict_of_Interest_Policy.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnFxProWallet.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/FxPro_Wallet.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnRiskDisclosure.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Risk_Disclosure_Notice.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnRiskDisclosureAr.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Risk_Disclosure_Notice_ar.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnRetailRiskDisclosure.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Retail_FX_Risk_Disclosure_Statement.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);

            pageLegalDocumentation.BtnTermsAndConditionsForFixedSpreadAccount.Click();
            Assert.AreEqual(@"https://datarepo.fxpro.co.uk/legal/mena/Terms_and_Conditions_for_Fixed_Spread_Account.pdf", ngWebDriver.WrappedDriver.Url);
            ngWebDriver.WrappedDriver.Navigate().Back();
            pageTradingAccountsReal.WaitLoadPage(pageLegalDocumentation);
        }
예제 #22
0
        public void RegistrationNewUser_UAE_No_No_No_Screenshot(string lng)
        {
            #region Test Data

            var randomPart = RegistrationHelper.GetRandom(8);

            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 (please specify)";
            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(webDriver, lng);
            Assert.AreEqual(pageLogin.ExpectedUrl, webDriver.Url);
            AssertHelper.AssertScreenShot(webDriver, pageLogin.ScreenShot, 0);
            pageLogin.LnkRegister.Click();
            //webDriver.WaitForAngular();

            //Registration Step 0
            PageRegister pageRegister = new PageRegister(webDriver, lng);
            AssertHelper.AssertScreenShot(webDriver, pageRegister.ScreenShot, 0);
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            PageRregisterStep1 pageRegisterStep1 = new PageRregisterStep1(webDriver, lng);
            AssertHelper.AssertScreenShot(webDriver, pageRegisterStep1.ScreenShot, 0);
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            PageRregisterStep2 pageRegisterStep2 = new PageRregisterStep2(webDriver, lng);
            AssertHelper.AssertScreenShot(webDriver, pageRegisterStep2.ScreenShot, 0);
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            PageRregisterStep3 pageRegisterStep3 = new PageRregisterStep3(webDriver, lng);
            AssertHelper.AssertScreenShot(webDriver, pageRegisterStep3.ScreenShot, 0);
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Wait.UrlContains(webDriver, pageTradingAccountsReal.ExpectedUrl);
        }
예제 #23
0
        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);
        }
예제 #24
0
        public void LegalDocumentation(string lng)
        {
            #region Test Data

            string login = "******";
            string pas   = "******";

            #endregion

            //Create user
            LoginHelper.Login(webDriver, lng, login, pas);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.BtnMenuProfile.Click();
            pageTradingAccountsReal.LnkMenuMyProfile.Click();

            PageProfile pageProfile = new PageProfile(webDriver, lng);
            pageProfile.LnkLegalDocumentation.Click();

            PageLegalDocumentation pageLegalDocumentation = new PageLegalDocumentation(webDriver, lng);

            pageLegalDocumentation.BtnClientAgreement.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Client_Agreement.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnClientAgreementAr.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Client_Agreement_ar.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnComplaintsHandlingProcedure.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Complaints_Handling_Procedure.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnOrderExecutionPolicy.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Order_Execution_Policy.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnOrderExecutionPolicyAr.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Order_Execution_Policy_ar.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnClientCategorisationNotice.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Client_Categorisation_Notice.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnConflictsOfInterestPolicy.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Conflict_of_Interest_Policy.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnFxProWallet.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/FxPro_Wallet.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnRiskDisclosure.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Risk_Disclosure_Notice.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnRiskDisclosureAr.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Risk_Disclosure_Notice_ar.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnRetailRiskDisclosure.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Retail_FX_Risk_Disclosure_Statement.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);

            pageLegalDocumentation.BtnTermsAndConditionsForFixedSpreadAccount.Click();
            Wait.UrlContains(webDriver, @"https://s3.eu-central-1.amazonaws.com/files-mrkt/datarepo/legal/mena/Terms_and_Conditions_for_Fixed_Spread_Account.pdf");
            pageLegalDocumentation.GoToBack();
            Wait.UrlContains(webDriver, pageLegalDocumentation.ExpectedUrl);
        }
        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);
        }
예제 #26
0
        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.GetRandom(8);

            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 (please specify)";
            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(webDriver, lng);
            pageLogin.LnkRegister.Click();

            //Registration Step 0
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Wait.ElementIsVisible(webDriver, pageTradingAccountsReal.LnkCreateNewAccount);

            //null
            //without partner; Jurisdiction = mena; Country = UAT; default; default
            pageTradingAccountsReal.LnkCreateNewAccount.Click();
            PageCreateRealAccount pageCreateRealAccount = new PageCreateRealAccount(webDriver, lng);
            //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.LnkCreateNewAccount.Click();
            //YES
            //Assert.AreEqual(goodPartner1Name, pageCreateRealAccount.CmbSelectPartnership.GetValue());
            Assert.AreEqual(goodPartner1Id, 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.LnkCreateNewAccount.Click();
            //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.LnkCreateNewAccount.Click();
            //YES
            //Assert.AreEqual(goodPartner3MenaName, pageCreateRealAccount.CmbSelectPartnership.GetValue());
            Assert.AreEqual(goodPartner3MenaId, 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.LnkCreateNewAccount.Click();
            //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.GetRandom(8);

            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(webDriver, lng);
            pageLogin.LnkRegister.Click();

            //Registration Step 0
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            //pageTradingAccountsReal.WaitLoadPage();
        }
예제 #28
0
        public void UK_No_No(string lng)
        {
            #region Test Data

            var randomPart = RegistrationHelper.GetRandom(8);

            DataStep0 dataStep0 = new DataStep0();
            dataStep0.TxtEmail = randomPart + "@testing.test";
            Log.Info("Email new user = "******"******";
            Log.Info("Password new user = "******"TestNameUK";
            dataStep0.TxtLastName  = "TestLastNameUK";
            dataStep0.CmbCountry   = "United Kingdom";
            dataStep0.BtnNexStep   = true;

            DataStep1 dataStep1 = new DataStep1();
            dataStep1.TxtAddress   = "Liverpool Street 1";
            dataStep1.TxtPostcode  = "EC2M 7AY";
            dataStep1.TxtCity      = "London";
            dataStep1.TxtBirthdate = "01/01/1990";
            dataStep1.TxtPhone     = "440000000000";

            #region UK
            dataStep1.TxtStreetName    = "Liverpool ";
            dataStep1.TxtState         = "London state";
            dataStep1.TxtYearMoved     = "1980";
            dataStep1.TxtMiddleInitial = "E";
            dataStep1.TxtMothersName   = "Hurt";
            #endregion

            //dataStep1.CmbNationality = "United Kingdom";
            dataStep1.BtnNexStep = true;


            DataStep2 dataStep2 = new DataStep2();
            //Employment Information
            dataStep2.CmbEmployment       = "Student";
            dataStep2.CmbEmploymentType   = "Education";
            dataStep2.CmbLevelOfEducation = "High School";
            //Financial Information
            dataStep2.CmbAnnualIncome        = "$0 - $50,000";
            dataStep2.CmbEstimatedNetWorth   = "$50,000 - $100,000";
            dataStep2.CmbSourceOfIncome      = "Other";
            dataStep2.TxtSourceOfIncomeOther = "Mama";
            dataStep2.CmbDeposit             = "$10,000 - $50,000";
            dataStep2.ChkToTradeCFDs         = true;
            //Trading Experience
            dataStep2.CmbTradingExperience = "No";
            dataStep2.ChkAllOfAbove        = true;

            dataStep2.CmbQuestion1     = "500 EUR";
            dataStep2.CmbQuestion2     = "A take profit order";
            dataStep2.CmbQuestion3     = "Loss would be the same";
            dataStep2.CmbRiskQuestion1 = "I will be very upset and never trade CFDs again";

            dataStep2.BtnNexStep = true;


            DataStep3 dataStep3 = new DataStep3();
            dataStep3.CmbAccountType = "FxPro Edge";
            //dataStep3.CmbLeverage = "1:50";
            dataStep3.CmbCurrencyBase             = "GBP";
            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(webDriver, lng);
            pageLogin.LnkRegister.Click();

            //Registration Step 0
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            Wait.UrlContains(webDriver, pageTradingAccountsReal.ExpectedUrl);
        }
예제 #29
0
        public void Cyprus_Yes_No_InternallyApproved(string lng)
        {
            #region Test Data

            var randomPart = RegistrationHelper.GetRandom(8);

            DataStep0 dataStep0 = new DataStep0();
            dataStep0.TxtEmail = randomPart + "@testing.test";
            Log.Info("Email new user = "******"******";
            Log.Info("Password new user = "******"TestNameCy";
            dataStep0.TxtLastName  = "TestLastNameCy";
            dataStep0.CmbCountry   = "Cyprus";
            dataStep0.BtnNexStep   = true;

            DataStep1 dataStep1 = new DataStep1();
            dataStep1.TxtAddress   = "Parmenidou 8";
            dataStep1.TxtPostcode  = "3022";
            dataStep1.TxtCity      = "Germasogeia";
            dataStep1.TxtBirthdate = "01/01/1990";
            dataStep1.TxtPhone     = "35700000000";

            dataStep1.BtnNexStep = true;


            DataStep2 dataStep2 = new DataStep2();
            //Employment Information
            dataStep2.CmbEmployment         = "Employed";                                                   //pc
            dataStep2.CmbEmploymentType     = "Financial Services (eligible for professional clients)";     //pc
            dataStep2.CmbEmploymentPosition = "Senior management";
            dataStep2.CmbLevelOfEducation   = "High School";
            //Financial Information
            dataStep2.CmbAnnualIncome      = "$500,000 - $1,000,000";
            dataStep2.CmbEstimatedNetWorth = "> $1,000,000 (eligible for professional clients)";
            dataStep2.CmbSourceOfIncome    = "Savings / Investments";
            dataStep2.CmbCountryOfOrigin   = "Cyprus";
            dataStep2.CmbDeposit           = "> $1,000,000";
            dataStep2.ChkToTradeCFDs       = true;
            //Trading Experience
            dataStep2.CmbTradingExperience     = "Yes, I have traded on a real account";
            dataStep2.CmbExperience            = "> 3 years";
            dataStep2.CmbHowManyTimesYouTraded = "More than 10 per quarter (eligible for professional clients)";

            dataStep2.CmbQuestion1     = "500 EUR";
            dataStep2.CmbQuestion2     = "A take profit order";
            dataStep2.CmbQuestion3     = "Loss would be the same";
            dataStep2.CmbRiskQuestion1 = "I will be very upset and never trade CFDs again";

            dataStep2.BtnNexStep = true;


            DataStep3 dataStep3 = new DataStep3();
            dataStep3.CmbAccountType  = "MT4 Instant";
            dataStep3.CmbLeverage     = "1:30";
            dataStep3.CmbCurrencyBase = "USD";

            dataStep3.BtnProClientInterestedYes = true;

            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(webDriver, lng);
            pageLogin.LnkRegister.Click();

            //Registration Step 0
            RegistrationHelper.RegistrationStep0(webDriver, dataStep0, lng);

            //Registration Step 1
            RegistrationHelper.RegistrationStep1(webDriver, dataStep1, lng);

            //Registration Step 2
            RegistrationHelper.RegistrationStep2(webDriver, dataStep2, lng);

            //Registration Step 3
            RegistrationHelper.RegistrationStep3(webDriver, dataStep3, lng);

            //Internally Approved = true
            ApiHelper.SetApprovedForAcceptance(webDriver);

            PageTradingAccountsReal pageTradingAccountsReal = new PageTradingAccountsReal(webDriver, lng);
            pageTradingAccountsReal.LnkProAcceptance.Click();

            PageProAcceptance pageProAcceptance = new PageProAcceptance(webDriver, lng);
            pageProAcceptance.ChkAcknowledgementRecategorisation.Click();
            pageProAcceptance.BtnProceed.Click();

            //pageTradingAccountsReal.WaitLoadPage();
            Assert.AreEqual("Your acceptance has been received successfully. You will shortly be categorized as professional client.", pageTradingAccountsReal.MsgSuccess.Text);
        }
예제 #30
0
        public void Partner_Thai_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 = "******"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);

            //null
            //without partner; Jurisdiction = mena; Country = Arabia; 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 = Arabia; null; null
            pageTradingAccountsReal.GoToPage(pageTradingAccountsReal.BaseUrl + "/partner/" + goodPartner3MenaId);
            pageTradingAccountsReal.WaitLoadPage(pageTradingAccountsReal);
            pageTradingAccountsReal.LnkCreateNewAccount.Click();
            pageCreateRealAccount.WaitLoadPage(pageCreateRealAccount);
            //YES
            Assert.AreEqual(goodPartner3MenaName, pageCreateRealAccount.CmbSelectPartnership.GetValue());
            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" });
        }