Source:
<code>public void createAndDeleteProjectTest() throws ExecutionException, InterruptedException { dashboard.waitDashboardToolbarTitle(); dashboard.selectWorkspacesItemOnDashboard(); workspaces.clickOnAddWorkspaceBtn(); newWorkspace.waitToolbar(); newWorkspace.selectStack(TestStacksConstants.JAVA.getId()); newWorkspace.typeWorkspaceName(WORKSPACE); projectSourcePage.clickOnAddOrImportProjectButton(); projectSourcePage.selectSample(WEB_JAVA_SPRING); projectSourcePage.selectSample(CONSOLE_JAVA_SIMPLE); projectSourcePage.clickOnAddProjectButton(); newWorkspace.clickOnCreateButtonAndOpenInIDE(); <START> String dashboardWindow = seleniumWebDriver.getWindowHandle(); <END> seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); ide.waitOpenedWorkspaceIsReadyToUse(); explorer.waitItem(CONSOLE_JAVA_SIMPLE); notificationsPopupPanel.waitPopupPanelsAreClosed(); mavenPluginStatusBar.waitClosingInfoPanel(); explorer.waitDefinedTypeOfFolder(CONSOLE_JAVA_SIMPLE, PROJECT_FOLDER); explorer.waitDefinedTypeOfFolder(WEB_JAVA_SPRING, PROJECT_FOLDER); notificationsPopupPanel.waitPopupPanelsAreClosed(); switchToWindow(dashboardWindow); dashboard.selectWorkspacesItemOnDashboard(); workspaces.selectWorkspaceItemName(WORKSPACE); workspaceDetails.selectTabInWorkspaceMenu(PROJECTS); workspaceProjects.waitProjectIsPresent(WEB_JAVA_SPRING); workspaceProjects.waitProjectIsPresent(CONSOLE_JAVA_SIMPLE); workspaceProjects.openSettingsForProjectByName(WEB_JAVA_SPRING); workspaceProjects.clickOnDeleteProject(); workspaceProjects.clickOnDeleteItInDialogWindow(); workspaceProjects.waitProjectIsNotPresent(WEB_JAVA_SPRING); workspaceProjects.openSettingsForProjectByName(CONSOLE_JAVA_SIMPLE); workspaceProjects.clickOnDeleteProject(); workspaceProjects.clickOnDeleteItInDialogWindow(); workspaceProjects.waitProjectIsNotPresent(CONSOLE_JAVA_SIMPLE); }</code><technical_language>rework seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability() return dashboardWindow</technical_language>

Target:
public void createAndDeleteProjectTest() throws ExecutionException, InterruptedException { dashboard.waitDashboardToolbarTitle(); dashboard.selectWorkspacesItemOnDashboard(); workspaces.clickOnAddWorkspaceBtn(); newWorkspace.waitToolbar(); newWorkspace.selectStack(TestStacksConstants.JAVA.getId()); newWorkspace.typeWorkspaceName(WORKSPACE); projectSourcePage.clickOnAddOrImportProjectButton(); projectSourcePage.selectSample(WEB_JAVA_SPRING); projectSourcePage.selectSample(CONSOLE_JAVA_SIMPLE); projectSourcePage.clickOnAddProjectButton(); newWorkspace.clickOnCreateButtonAndOpenInIDE(); String dashboardWindow = seleniumWebDriverHelper.switchToIdeFrameAndWaitAvailability(); ide.waitOpenedWorkspaceIsReadyToUse(); explorer.waitItem(CONSOLE_JAVA_SIMPLE); notificationsPopupPanel.waitPopupPanelsAreClosed(); mavenPluginStatusBar.waitClosingInfoPanel(); explorer.waitDefinedTypeOfFolder(CONSOLE_JAVA_SIMPLE, PROJECT_FOLDER); explorer.waitDefinedTypeOfFolder(WEB_JAVA_SPRING, PROJECT_FOLDER); notificationsPopupPanel.waitPopupPanelsAreClosed(); switchToWindow(dashboardWindow); dashboard.selectWorkspacesItemOnDashboard(); workspaces.selectWorkspaceItemName(WORKSPACE); workspaceDetails.selectTabInWorkspaceMenu(PROJECTS); workspaceProjects.waitProjectIsPresent(WEB_JAVA_SPRING); workspaceProjects.waitProjectIsPresent(CONSOLE_JAVA_SIMPLE); workspaceProjects.openSettingsForProjectByName(WEB_JAVA_SPRING); workspaceProjects.clickOnDeleteProject(); workspaceProjects.clickOnDeleteItInDialogWindow(); workspaceProjects.waitProjectIsNotPresent(WEB_JAVA_SPRING); workspaceProjects.openSettingsForProjectByName(CONSOLE_JAVA_SIMPLE); workspaceProjects.clickOnDeleteProject(); workspaceProjects.clickOnDeleteItInDialogWindow(); workspaceProjects.waitProjectIsNotPresent(CONSOLE_JAVA_SIMPLE); }