-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting started with Vaadin TestBench Maven project
- Loading branch information
1 parent
80e2587
commit f937efa
Showing
5 changed files
with
38 additions
and
165 deletions.
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package my.vaadin.app.test; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.BlockJUnit4ClassRunner; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.firefox.FirefoxDriver; | ||
|
||
import com.vaadin.testbench.TestBenchTestCase; | ||
import com.vaadin.testbench.elements.ButtonElement; | ||
import com.vaadin.testbench.elements.TextFieldElement; | ||
|
||
@RunWith(BlockJUnit4ClassRunner.class) | ||
public class MyFirstUITest extends TestBenchTestCase { | ||
|
||
private WebDriver driver; | ||
|
||
@Before | ||
public void setup() { | ||
setDriver(driver = new FirefoxDriver()); | ||
} | ||
|
||
@Test | ||
public void testMyStuff() { | ||
driver.get("http://localhost:8080"); | ||
$(ButtonElement.class).caption("Add new customer").first().click(); | ||
assertTrue($(TextFieldElement.class).caption("Email").exists()); | ||
} | ||
|
||
@After | ||
public void teardown() { | ||
driver.close(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.