override public void TearDown() { TranslatePage translatePage = new TranslatePage(driver); translatePage.FromField.Clear(); translatePage.ToField.Clear(); }
public void SwapLanguage() { var translatePage = new TranslatePage(); translatePage.SwapButton(); translatePage.ClearText(); }
override public void OneTimeSetUp() { TestConfigurations configs = TestConfigurations.GetInstance(); homePage = Navigator.OpenHomePage(driver); homePage.SelectUkrLanguageButton.Click(); translatePage = Navigator.OpenTranslatePage(driver); }
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")); }
public void TypeUkraineText(string text) { var translatePage = new TranslatePage(); translatePage.SelectDocumentTab(); translatePage.SelectTextTab(); //translatePage.SelectUkranianLanguage(); //translatePage.SelectEnglishLanguage(); translatePage.TypeText(text); }
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); }
//[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(); }
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"); }
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(); }
public override void BaseOneTimeSetUp() { translatePage = Navigator.NavigateToTranslatePage(driver); }