public void CarlaDeleteCurrentAccount() { string deleteAccountURL = $"{baseUri}api/accounts/delete/current"; string script = $"fetch(\"{deleteAccountURL}\", {{method: \"POST\", body: {{}}}})"; ngDriver.ExecuteScript(script); // note that the above call to delete the account will take a period of time to execute. ngDriver.Navigate().GoToUrl($"{baseUri}logout"); }
public void Setup() { driver = new EdgeDriver(); driver.Navigate().GoToUrl("http://todomvc.com/examples/angularjs/#/"); driver.Manage().Window.Maximize(); ngDriver = new NgWebDriver(driver); ngDriver.Manage().Timeouts().SetScriptTimeout(new TimeSpan(0, 0, 15)); ngDriver.WaitForAngular(); WebDriverWait wait = new WebDriverWait(ngDriver, new TimeSpan(0, 0, 15)); wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("new-todo"))); ngDriver.ExecuteScript("window.localStorage.clear();"); }
public void TearDown() { ngDriver.ExecuteScript("window.localStorage.clear();"); driver.Close(); driver.Dispose(); }
private void ScrollTable() { ngDriver.WaitForAngular(); ngDriver.ExecuteScript("window.scrollTo(0, document.body.scrollHeight)"); Thread.Sleep(1000); }