when(we2.getTagName()).thenReturn("div");
when(we2.findElement(tagName("span"))).thenReturn(we3);
when(we3.getTagName()).thenReturn("span");
try {
FluentWebElement span = fwd.div(ID_A).div(ID_B).span();
doThrow(new RuntimeException()).when(we3).sendKeys("RAIN_IN_SPAIN");
span.sendKeys("RAIN_IN_SPAIN");
fail("should have barfed");
} catch (FluentExecutionStopped e) {
assertThat(e.getMessage(), equalTo("RuntimeException during invocation of: ?.div(By.id: idA).div(By.id: idB).span().sendKeys('RAIN_IN_SPAIN')"));
assertThat(e.getCause(), notNullValue());
verify(wd).executeScript("op", we3, "value");