Selenium c# accept confirm box
问题 I have written an nUnit test using selenium in c#. All was going well until I have to confirm a JS confirm box. here is the code I am using: this.driver.FindElement(By.Id("submitButton")).Click(); this.driver.SwitchTo().Alert().Accept(); The confirm box appears after the submit button. The confirm appears and then disappears immediately but the form does not submit. The behaviour is the same regardless of the accept() line above. I am using Firefox v15.0.1 and selenium v2.24 I have tried