before i clicking the button, the html code for the page is below
<div id="layerContainer"> </div>
but after clicking a button, than the code appears like picture here
I tried to find the new button, but always "unable to find element ~@" ]
wait.Until(ExpectedConditions.ElementExists(By.XPath("//*[@id='layerContainer']/div/section/div/div[2]/form/article/footer/div/button")));
IWebElement submit2 = this.driver.FindElement(By.XPath("//*[@id='layerContainer']/div/section/div/div[2]/form/article/footer/div/button"));
submit2.Click();
my purpose is to find out the newly generated button and click on it, but it fails to find out the new button all the time, is there any way to solve it?