/** * Run the String getElDom() method test. * * @throws Exception */ @Test public void testGetElDom() throws Exception { WebElement mockedEl = Mockito.mock(WebElement.class); ByExtJsGetCmp by = cmpIdBy; Mockito.when(by.findElement(driver)).thenReturn(mockedEl); final ExtJSComponent cmp_result = new ExtJSComponent(driver, by); assertNotNull(cmp_result); Mockito.when(((JavascriptExecutor) driver).executeScript(Mockito.contains("getEl().dom"))) .thenReturn(mockedEl); assertEquals(mockedEl, cmp_result.getElDom()); }