package ru.colibri.ui.steps.general;

import ru.colibri.ui.core.settings.DriversSettings;
import ru.colibri.ui.core.steps.AbsSteps;

import java.util.concurrent.TimeUnit;

public abstract class AbsServiceSteps extends AbsSteps {

    public void goToMain(String screenName) {
        int implicitlyWaitInSecondsOld = getDriversSettings().getImplicitlyWaitInSeconds();
        int implicitlyWaitInSecondsNew = 10;
//        уменьшаем ожидалку
        driver.manage().timeouts().implicitlyWait(implicitlyWaitInSecondsNew, TimeUnit.SECONDS);
        returnCycle(screenName);
//        возвращаем ожидалку на место
        driver.manage().timeouts().implicitlyWait(implicitlyWaitInSecondsOld, TimeUnit.SECONDS);
    }


    protected abstract void returnCycle(String screenName);

    protected abstract ISystemButtonsClick getISystemButtonsClickBean();

    protected abstract DriversSettings getDriversSettings();

    protected abstract String getAlertLocator();
}

@@ -223,16 +223,91 @@
 teps %7B%0A%0A
+    private static final int TIMEOUT = 7;%0A    private int currentTimeout;%0A%0A
     publ
@@ -344,37 +344,41 @@
 Name) %7B%0A        
-int i
+decreaseI
 mplicitlyWaitInS
@@ -378,147 +378,206 @@
 Wait
-InSecondsOld = getDriversSettings().getImplicitlyWaitInSeconds();%0A        int implicitlyWaitInSecondsNew = 10;%0A//        %D1%83%D0%BC%D0%B5%D0%BD%D1%8C%D1%88%D0%B0%D0%B5%D0%BC %D0%BE%D0%B6%D0%B8%D0%B4%D0%B0%D0%BB%D0%BA%D1%83
+();%0A        returnCycle(screenName);%0A        increaseImplicitlyWait();%0A%0A    %7D%0A%0A    private void decreaseImplicitlyWait() %7B%0A        currentTimeout = getDriversSettings().getImplicitlyWaitInSeconds();
 %0A   
@@ -627,34 +627,15 @@
 ait(
-implicitlyWaitInSecondsNew
+TIMEOUT
 , Ti
@@ -659,75 +659,54 @@
     
+%7D%0A%0A
     
-returnCycle(screenName);%0A//        %D0%B2%D0%BE%D0%B7%D0%B2%D1%80%D0%B0%D1%89%D0%B0%D0%B5%D0%BC %D0%BE%D0%B6%D0%B8%D0%B4%D0%B0%D0%BB%D0%BA%D1%83 %D0%BD%D0%B0 %D0%BC%D0%B5%D1%81%D1%82%D0%BE
+private void increaseImplicitlyWait() %7B
 %0A   
@@ -756,34 +756,22 @@
 ait(
-implicitlyWaitInSecondsOld
+currentTimeout
 , Ti

add increaseImplicitlyWait and decreaseImplicitlyWait in AbsServiceSteps (#5)