public void TranslateText(string firstlang, string seclang, string word, string translatedWord) { WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); TranslatorObject translateObject = new TranslatorObject(driver); //Actions action = new Actions(driver); translateObject.selectFirstlang.Click(); Thread.Sleep(1000); translateObject.SelectFirstLan(firstlang); Thread.Sleep(1000); wait.Until(p => translateObject.firstLangPopup.Displayed); // translateObject.FirstLan(firstlang); translateObject.selectSeclang.Click(); Thread.Sleep(1000); wait.Until(p => translateObject.secondLangPopup.Displayed); Thread.Sleep(1000); translateObject.SecondLan(seclang); Thread.Sleep(1000); translateObject.SendWord(word); Thread.Sleep(1000); translateObject.TranslateButton.Click(); translateObject.GetWord(translatedWord); }
public void TranslateText(string firstlang, string seclang, string word, string translatedWord) { WaitExtensions.PageLoadWait(driver); WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30)); TranslatorObject translateObject = new TranslatorObject(driver); Actions action = new Actions(driver); translateObject.selectFirstlang.Click(); wait.Until(p => translateObject.firstLangPopup.Enabled); translateObject.SelectFirstLan(firstlang); translateObject.selectSeclang.Click(); wait.Until(p => translateObject.secondLangPopup.Enabled); translateObject.SecondLan(seclang); translateObject.SendWord(word); translateObject.TranslateButton.Click(); translateObject.GetWord(translatedWord); }