public void VerifySwapSourceEnLanguageAndTargetUkLanguage() { // select source and target languages var languageBar = HomePage.TranslationBlock.LanguageBar; languageBar.OpenSourceLanguageList().SelectSourceLanguage(English) .OpenTargetLanguageList().SelectTargetLanguage(Ukrainien); // verify that languages are selected correctly Assert.IsTrue(languageBar.GetSelectedSourceLanguage().ToLower(). Equals(English.GetString())); Assert.IsTrue(languageBar.GetSelectedTargetLanguage().ToLower(). Equals(Ukrainien.GetString())); // enter source text var sourceContainer = HomePage.TranslationBlock.SourceContainer; sourceContainer.SetSourceText(TestConstants.SundayInEnglish); // verify translation var targetContainer = HomePage.TranslationBlock.ResultContainer; Assert.AreEqual(TestConstants.SundayInUkrainien, targetContainer.GetResultText()); // swap languages languageBar.SwapLanguages(); // verify languages are swapped in language bar Assert.IsTrue(languageBar.GetSelectedSourceLanguage().ToLower(). Equals(Ukrainien.GetString())); Assert.IsTrue(languageBar.GetSelectedTargetLanguage().ToLower(). Equals(English.GetString())); // verify text is swapped Assert.AreEqual(TestConstants.SundayInUkrainien, sourceContainer.GetSourceText()); Assert.AreEqual(TestConstants.SundayInEnglish, targetContainer.GetResultText()); }
public void VerifySearchSourceEnLanguageAndSearchTargetUkLanguage() { // search and select source and target languages var languageBar = HomePage.TranslationBlock.LanguageBar; languageBar.SearchAndSelectSourceLanguage(English) .SearchAndSelectTargetLanguage(Ukrainien); // verify that languages are selected correctly Assert.IsTrue(languageBar.GetSelectedSourceLanguage().ToLower(). Equals(English.GetString())); Assert.IsTrue(languageBar.GetSelectedTargetLanguage().ToLower(). Equals(Ukrainien.GetString())); }
public void VerifyAutoDeterminationOfSourseUkLanguage() { // enter source text var sourceContainer = HomePage.TranslationBlock.SourceContainer; sourceContainer.SetSourceText(TestConstants.TestingInUkrainien); // determinate language automatically var languageBar = HomePage.TranslationBlock.LanguageBar; languageBar.AutoDetermineLanguage(); // verify that language is determinated correctly Assert.IsTrue(languageBar.GetAutomaticallyDeterminedLanguage().ToLower(). Equals(Ukrainien.GetString())); }