public void Verify_Feed_URL(string Provider, string URL) { DataFeed_URLSchema = DB_Feed_URLSchema(Provider); App_URL = Feed_URL.GetText(); Assert.AreEqual(true, App_URL == URL, "feed_URL is displayed selected provider:" + Provider); Assert.AreEqual(true, App_URL == DataFeed_URLSchema.Url, "feed_URL is displayed selected provider:" + Provider); }
public void Feed_Configuration(string UName, string Paswd, string optionalName, string Action, string URL) { Entered_Username = UName; Entered_Password = Paswd; Entered_OPtionalName = optionalName; Entered_Url = URL; if (provider != "others") { App_URL = Feed_URL.GetText(); } Assert.AreEqual(true, UserName.Displayed, "Field Username is displayed"); Assert.AreEqual(true, Password.Displayed, "Field Username is displayed"); Assert.AreEqual(true, OptionalName.Displayed, "Field Username is displayed"); Assert.AreEqual(true, BtnSave.Displayed, "Field Username is displayed"); Assert.AreEqual(true, BtnCancel.Displayed, "Field Username is displayed"); UserName.EnterText(UName); Password.EnterText(Paswd); OptionalName.EnterText(optionalName); if (provider == "others") { URL_Otherfeed.EnterText(URL); } if (Action == "Save" && UName != "" && Paswd != "") { BtnSave.WebClick(); // bool a = Driver.FindElement(By.XPath("//div[contains(text(),'Success: Provider configuration saved'")).Displayed; //bool b = Driver.FindElement(By.XPath("//div[contains(text(),'Info: Added to previosly configured feeds'")).Displayed; // System.Threading.Thread.Sleep(5000); } if (Action == "Cancel") { BtnCancel.WebClick(); } // System.Threading.Thread.Sleep(5000); WebDriverWait wait = new WebDriverWait(BrowserFactory.Driver, TimeSpan.FromSeconds(15)); wait.Until(waithelper.ExpectedConditions.InvisibilityOfElementLocated(By.XPath(".//*[contains(@class,'toast-message')]"))); }