public void TestQuizzEdge() { using (var driver = new EdgeDriver(Path.GetDirectoryName (Assembly.GetExecutingAssembly().Location))) { driver.Navigate().GoToUrl (@"https://*****:*****@cimob.pt", "teste12"); driver.FindElement(By.Id("News")).Click(); driver.FindElement(By.Id("CreateEdital")).Click(); string testOpenDate = "01/01/2018"; string testCloseDate = "10/10/2018"; string testTitle = "I'm a testing edital!"; string testContent = "I'm a edital Test Content!"; string testUrl = "www.testing.testedital"; driver.FindElement(By.Id("OpenDate")).SendKeys(testOpenDate); driver.FindElement(By.Id("CloseDate")).SendKeys(testCloseDate); driver.FindElement(By.Id("Title")).SendKeys(testTitle); driver.FindElement(By.Id("TextContent")).SendKeys(testContent); driver.FindElement(By.Id("link-text")).SendKeys(testUrl); driver.FindElement(By.Id("EditalSubmit")).Click(); wait.Until(ExpectedConditions.TextToBePresentInElement(driver.FindElement(By.ClassName("table")), testTitle)); } }
public void TestNewsFirefox() { using (var driver = new FirefoxDriver((Path.GetDirectoryName (Assembly.GetExecutingAssembly().Location)))) { driver.Navigate().GoToUrl (@"https://*****:*****@cimob.pt", "teste12"); driver.FindElement(By.Id("Application")).Click(); IWebElement tableElement = driver.FindElement(By.TagName("tbody")); IList <IWebElement> tableRow = tableElement.FindElements(By.TagName("tr")); IWebElement lastRow = tableRow.Last(); /*IWebElement evalButton = lastRow.FindElement(By.ClassName("eval")); * if(evalButton != null) { * evalButton.Click(); * }*/ //refresh tableElement = driver.FindElement(By.TagName("tbody")); tableRow = tableElement.FindElements(By.TagName("tr")); lastRow = tableRow.Last(); IWebElement interviewButton = lastRow.FindElement(By.ClassName("interview")); wait.Until(ExpectedConditions.ElementToBeClickable(interviewButton)); interviewButton.Click(); /*DateTime testDate = DateTime.Today; * driver.FindElement(By.Id("date")).Click(); * driver.FindElement(By.Id("date")).SendKeys(testDate.ToShortDateString()); */ //CHECK THIS wait.Until(ExpectedConditions.ElementToBeClickable(driver.FindElement(By.Id("submit")))); /*driver.FindElement(By.Id("News")).Click(); * driver.FindElement(By.Id("CreateNews")).Click(); * string testTitle = "I'm a testing new!"; * string testContent = "I'm a News Test Content!"; * string testUrl = "www.testing.test"; * driver.FindElement(By.Id("Title")).SendKeys(testTitle); * driver.FindElement(By.Id("TextContent")).SendKeys(testContent); * driver.FindElement(By.Id("link-text")).SendKeys(testUrl); * driver.FindElement(By.Id("NewsSubmit")).Click(); * wait.Until(ExpectedConditions.TextToBePresentInElement(driver.FindElement(By.ClassName("table")), testTitle));*/ } }
public void TestNewsFirefox() { using (var driver = new FirefoxDriver((Path.GetDirectoryName (Assembly.GetExecutingAssembly().Location)))) { driver.Navigate().GoToUrl (@"https://*****:*****@cimob.pt", "teste12"); driver.FindElement(By.Id("News")).Click(); driver.FindElement(By.Id("CreateNews")).Click(); string testTitle = "I'm a testing new!"; string testContent = "I'm a News Test Content!"; string testUrl = "www.testing.test"; driver.FindElement(By.Id("Title")).SendKeys(testTitle); driver.FindElement(By.Id("TextContent")).SendKeys(testContent); driver.FindElement(By.Id("link-text")).SendKeys(testUrl); driver.FindElement(By.Id("NewsSubmit")).Click(); wait.Until(ExpectedConditions.TextToBePresentInElement(driver.FindElement(By.ClassName("table")), testTitle)); TestPublish(driver); } }