Ejemplo n.º 1
0
 @Then("^a \"([^\"]*)\" of events is displayed$")
 public void a_of_events_is_displayed(String cssSelector) throws Throwable {
   webDriver.findElement(By.className(cssSelector));
 }
Ejemplo n.º 2
0
 @Then("^the first (\\d+) blocks from article is shown$")
 public void the_first_blocks_from_article_is_shown(int stories) throws Throwable {
   List<WebElement> s =
       webDriver.findElements(By.cssSelector(".story-latest .article-body .sample-paras p"));
   assertEquals(s.size(), stories);
 }
Ejemplo n.º 3
0
 @Then("^Latest developments is displayed$")
 public void Latest_developments_is_displayed() throws Throwable {
   WebElement heading = webDriver.waitForElement(By.cssSelector(".story-latest .story-sub-head"));
   assertTrue(heading.getText().equals("Latest"));
 }
Ejemplo n.º 4
0
 @Then("^Latest stories is displayed$")
 public void Latest_stories_is_displayed() throws Throwable {
   webDriver.waitForElement(By.id("js-latest-stories"));
 }
Ejemplo n.º 5
0
 @Given("^I am on an story$")
 public void I_am_on_an_article() throws Throwable {
   webDriver.open(story);
 }