Created
August 25, 2017 01:19
-
-
Save 64lines/61a210106722d51fb99b69f0c994e295 to your computer and use it in GitHub Desktop.
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
| /* Clicks an element */ | |
| driver.findElement(By.id("some-button")).click(); | |
| /* Write some text on the element */ | |
| driver.findElement(By.id("user-name")).sendKeys("Some text"); | |
| /* Clicks a link with the text "Download free" */ | |
| driver.findElement(By.linkText("Downwload free")).click(); | |
| /* Make it wait for some time until something you defined happens like the presence of an element */ | |
| (new WebDriverWait(driver, WAIT_SECONDS)).until(ExpectedConditions.presenceOfElementLocated(By.id("vote-for-prettiest-dog-button"))); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment