Created
March 13, 2015 16:20
-
-
Save johnmmoss/dbdcc6f9a986fa401787 to your computer and use it in GitHub Desktop.
Selenium API submitting a form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Find the submit button and click it | |
webDriver.FindElement(By.Id("CreateButton")).Click(); | |
// Find the form by its tag and submit it | |
webDriver.FindElement(By.TagName("form")).Submit(); | |
// Call submit on the element, it automatically submits the form | |
var descriptionElement = webDriver.FindElement(By.Id("Name")); | |
descriptionElement.Clear(); | |
descriptionElement.SendKeys(description); | |
descriptionElement.Submit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment