Example #1
0
        override public void TearDown()
        {
            TranslatePage translatePage = new TranslatePage(driver);

            translatePage.FromField.Clear();
            translatePage.ToField.Clear();
        }
Example #2
0
        public void SwapLanguage()
        {
            var translatePage = new TranslatePage();

            translatePage.SwapButton();
            translatePage.ClearText();
        }
Example #3
0
        override public void  OneTimeSetUp()
        {
            TestConfigurations configs = TestConfigurations.GetInstance();

            homePage = Navigator.OpenHomePage(driver);
            homePage.SelectUkrLanguageButton.Click();
            translatePage = Navigator.OpenTranslatePage(driver);
        }
Example #4
0
        public static TranslatePage OpenTranslatePage(IWebDriver driver)
        {
            driver = WebDriverFactory.GetInstance();
            driver.Navigate().GoToUrl("https://perevod.i.ua/");
            TranslatePage translatePage = new TranslatePage(driver);

            return(translatePage);
        }
        public void TestTranslate(string wordFrom, string wordTo, string langFrom, string langTo)
        {
            TranslatePage trPage = new TranslatePage(driver);

            trPage.FirstTextArea.SendKeys(wordFrom);
            trPage.Translate(langFrom, langTo);
            Assert.AreEqual(wordTo, trPage.SecondTextArea.GetAttribute("value"));
        }
Example #6
0
        public void TypeUkraineText(string text)
        {
            var translatePage = new TranslatePage();

            translatePage.SelectDocumentTab();
            translatePage.SelectTextTab();
            //translatePage.SelectUkranianLanguage();
            //translatePage.SelectEnglishLanguage();
            translatePage.TypeText(text);
        }
Example #7
0
        public void Test_GoToTranslatePage()
        {
            IWebDriver driver = new ChromeDriver();

            driver.Navigate().GoToUrl("http://www.i.ua/");

            HomePage      homePage      = new HomePage(driver);
            TranslatePage translatePage = homePage.GoToTranslatePage();

            translatePage.TranslatePhrase("kit");
            Assert.AreEqual("кіт", translatePage.SecondTextArea.Text);
        }
Example #8
0
        //[TestCase("un chat", "cat", "Fre")]
        public void Testransl(string word, string trans, string language)
        {
            TranslatePage tPage = new TranslatePage(driver);

            tPage.Translate(word);
            tPage.SetButtonLanguageDropdown();
            tPage.SetWaitSelectLanguage(language);
            tPage.SetWaitTranslateButton();

            Assert.AreEqual(tPage.Translated.GetAttribute("value"), trans);

            tPage.SetFieldClear();
        }
Example #9
0
        public void TestTranslateEnglishTextToUkraine()
        {
            //test steps
            var translatePage  = new TranslatePage();
            var traslateAction = new TranslateActions();

            traslateAction.TypeEnglishText(Data.enText);

            Assert.AreEqual(Data.ukText, translatePage.GetTranslateText(), "Translate is not correct");
            traslateAction.SwapLanguage();
            traslateAction.TypeUkraineText(Data.ukText);
            Commons.Sleep(5000);
            Assert.AreEqual(Data.enText, translatePage.GetTranslateText(), "Translate is not correct");
        }
Example #10
0
 public void translateIT(string from, string to, string first_word, string expected_res)
 {
     translatePage = new TranslatePage(driver);
     translatePage.Translate(from, to, first_word, expected_res);
     Assert.AreEqual(expected_res, translatePage.SecondTextArea.Text);
 }
        public void ClearField()
        {
            TranslatePage trPage = new TranslatePage(driver);

            trPage.FirstTextArea.Clear();
        }
Example #12
0
 public override void BaseOneTimeSetUp()
 {
     translatePage = Navigator.NavigateToTranslatePage(driver);
 }