Skip to content

Commit

Permalink
Added a test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcasperson committed Oct 10, 2019
1 parent 99bfdae commit dfb8fae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/com/octopus/StepTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,18 @@ public void keyInteraction() throws URISyntaxException {
}
}

@Test
public void javascriptTest() throws URISyntaxException {
final AutomatedBrowser automatedBrowser = AUTOMATED_BROWSER_FACTORY.getAutomatedBrowser("FirefoxNoImplicitWait");

try {
automatedBrowser.init();
automatedBrowser.goTo(FormTest.class.getResource("/form.html").toURI().toString());
automatedBrowser.runJavascript(" document.getElementById('message').textContent = 'Raw JavaScript';");
assertEquals("Raw JavaScript", automatedBrowser.getTextFromElementWithId("message"));
} finally {
automatedBrowser.destroy();
}
}

}

0 comments on commit dfb8fae

Please sign in to comment.