### Question:
WebDriverRunner implements Runner { public Element getElement(String currentPageName, String elementName) { if ((currentPageName == null) || (currentPageName.equals(""))) { throw new BehaveException(message.getString("exception-page-not-selected")); } Field f = ReflectionUtil.getElementMap(currentPageName, elementName); ElementMap map = f.getAnnotation(ElementMap.class); Class<?> clazz = f.getType(); Element element = null; if (clazz.isInterface()) { element = (Element) InjectionManager.getInstance().getInstanceDependecy(clazz); } else if (Element.class.isAssignableFrom(clazz)) { try { element = (Element) clazz.newInstance(); } catch (Exception e) { element = null; } } else { throw new BehaveException(message.getString("exception-class-not-element", clazz.getName(), elementName, currentPageName)); } if (element == null) { throw new BehaveException(message.getString("exception-instance-element", elementName, currentPageName)); } element.setElementMap(map); return element; }  Object getDriver(); void start(); void navigateTo(String url); void get(String url); String getCurrentUrl(); String getTitle(); Element getElement(String currentPageName, String elementName); @Override Element getElement(Class<?> elementClass); String getPageSource(); void close(); void quit(); Screen getScreen(); File saveScreenshot(); File saveScreenshotTo(String fileName); File saveScreenshotTo(String fileName, boolean generateSource); void setScreen(String screenName); static String MESSAGEBUNDLE; }### Answer:
@Test public void testGetElement() { WebDriver driverExpected = Mockito.mock(WebDriver.class); WebDriverRunner runner = new WebDriverRunner(); runner.setWebDriver(driverExpected); TextField field = (TextField) runner.getElement("Busca", "Botao"); Assert.assertNotNull(field); Assert.assertTrue(field.toString().contains(".WebTextField")); }