Search in sources :

Example 1 with WebDriverActionExecution

use of com.hribol.automation.replay.WebDriverActionExecution in project selenium_java by sergueik.

the class ReplayBrowserTest method replayInvokesExecutionExecuteMethodOnScreen.

@Test
public void replayInvokesExecutionExecuteMethodOnScreen() throws InterruptedException, IOException, URISyntaxException {
    ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
    TestScenario testScenario = Mockito.mock(TestScenario.class);
    WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
    LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
    Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
    String screen = ":1";
    ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory);
    replayBrowser.replayOnScreen(testScenario, webDriverActionExecution, screen);
    Mockito.verify(webDriverActionExecution).executeOnScreen(testScenario, screen);
}
Also used : ApplicationActionFactory(com.hribol.automation.core.execution.application.ApplicationActionFactory) TestScenario(com.hribol.automation.core.execution.executor.TestScenario) WebDriverActionExecution(com.hribol.automation.replay.WebDriverActionExecution) LoadingTimes(com.hribol.automation.core.utils.LoadingTimes) ReplayBrowser(com.hribol.automation.replay.ReplayBrowser) Test(org.junit.Test)

Example 2 with WebDriverActionExecution

use of com.hribol.automation.replay.WebDriverActionExecution in project selenium_java by sergueik.

the class ReplayBrowserTest method replayFromFileOnScreenInvokesExecutionExecuteMethod.

@Test
public void replayFromFileOnScreenInvokesExecutionExecuteMethod() throws InterruptedException, IOException, URISyntaxException {
    ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
    TestScenario testScenario = Mockito.mock(TestScenario.class);
    WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
    LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
    Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
    TestScenarioFactory testScenarioFactory = Mockito.mock(TestScenarioFactory.class);
    String pathToSerializedTest = "testcase.json";
    String screen = ":1";
    Mockito.when(testScenarioFactory.createFromFile(applicationActionFactory, pathToSerializedTest)).thenReturn(testScenario);
    ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory, testScenarioFactory);
    replayBrowser.replayOnScreen(pathToSerializedTest, webDriverActionExecution, screen);
    Mockito.verify(webDriverActionExecution).executeOnScreen(testScenario, screen);
}
Also used : ApplicationActionFactory(com.hribol.automation.core.execution.application.ApplicationActionFactory) TestScenario(com.hribol.automation.core.execution.executor.TestScenario) WebDriverActionExecution(com.hribol.automation.replay.WebDriverActionExecution) LoadingTimes(com.hribol.automation.core.utils.LoadingTimes) TestScenarioFactory(com.hribol.automation.core.execution.executor.TestScenarioFactory) ReplayBrowser(com.hribol.automation.replay.ReplayBrowser) Test(org.junit.Test)

Example 3 with WebDriverActionExecution

use of com.hribol.automation.replay.WebDriverActionExecution in project selenium_java by sergueik.

the class ReplayBrowserTest method replayInvokesExecutionExecuteMethod.

@Test
public void replayInvokesExecutionExecuteMethod() throws InterruptedException, IOException, URISyntaxException {
    ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
    TestScenario testScenario = Mockito.mock(TestScenario.class);
    WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
    LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
    Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
    ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory);
    replayBrowser.replay(testScenario, webDriverActionExecution);
    Mockito.verify(webDriverActionExecution).execute(testScenario);
}
Also used : ApplicationActionFactory(com.hribol.automation.core.execution.application.ApplicationActionFactory) TestScenario(com.hribol.automation.core.execution.executor.TestScenario) WebDriverActionExecution(com.hribol.automation.replay.WebDriverActionExecution) LoadingTimes(com.hribol.automation.core.utils.LoadingTimes) ReplayBrowser(com.hribol.automation.replay.ReplayBrowser) Test(org.junit.Test)

Example 4 with WebDriverActionExecution

use of com.hribol.automation.replay.WebDriverActionExecution in project selenium_java by sergueik.

the class ReplayBrowserTest method replayFromFileInvokesExecutionExecuteMethod.

@Test
public void replayFromFileInvokesExecutionExecuteMethod() throws InterruptedException, IOException, URISyntaxException {
    ApplicationActionFactory applicationActionFactory = Mockito.mock(ApplicationActionFactory.class);
    TestScenario testScenario = Mockito.mock(TestScenario.class);
    WebDriverActionExecution webDriverActionExecution = Mockito.mock(WebDriverActionExecution.class);
    LoadingTimes loadingTimes = Mockito.mock(LoadingTimes.class);
    Mockito.when(webDriverActionExecution.getLoadingTimes()).thenReturn(loadingTimes);
    TestScenarioFactory testScenarioFactory = Mockito.mock(TestScenarioFactory.class);
    String pathToSerializedTest = "testcase.json";
    Mockito.when(testScenarioFactory.createFromFile(applicationActionFactory, pathToSerializedTest)).thenReturn(testScenario);
    ReplayBrowser replayBrowser = new ReplayBrowser(applicationActionFactory, testScenarioFactory);
    replayBrowser.replay(pathToSerializedTest, webDriverActionExecution);
    Mockito.verify(webDriverActionExecution).execute(testScenario);
}
Also used : ApplicationActionFactory(com.hribol.automation.core.execution.application.ApplicationActionFactory) TestScenario(com.hribol.automation.core.execution.executor.TestScenario) WebDriverActionExecution(com.hribol.automation.replay.WebDriverActionExecution) LoadingTimes(com.hribol.automation.core.utils.LoadingTimes) TestScenarioFactory(com.hribol.automation.core.execution.executor.TestScenarioFactory) ReplayBrowser(com.hribol.automation.replay.ReplayBrowser) Test(org.junit.Test)

Aggregations

ApplicationActionFactory (com.hribol.automation.core.execution.application.ApplicationActionFactory)4 TestScenario (com.hribol.automation.core.execution.executor.TestScenario)4 LoadingTimes (com.hribol.automation.core.utils.LoadingTimes)4 ReplayBrowser (com.hribol.automation.replay.ReplayBrowser)4 WebDriverActionExecution (com.hribol.automation.replay.WebDriverActionExecution)4 Test (org.junit.Test)4 TestScenarioFactory (com.hribol.automation.core.execution.executor.TestScenarioFactory)2