I am trying to automate the Trello Activity extension, and I am trying to automatically press the button "Export to CSV" with Selenium.
And my code, I am trying to get the button with xPath:
driver.FindElement(By.XPath("//[@id=\'content\']/div/div[1]/div[1]/div[2]/span[1]/div/button")).Click();
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
wait.Until(ExpectedConditions.ElementExists(By.XPath("/html/body/section/div[1]/ul/li[1]/button")));
driver.FindElement(By.CssSelector("body > section > div:nth-child(1) > ul > li:nth-child(1) > button")).Click();`
Here is the button:
And this is its html:
I am trying to automate Trello Activity extension, and I am trying to automatically press the button "Export to CSV" with Selenium.