// Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
// 
// 	private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
//     private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//     private final Long          scenarioStart;
//     private TestEnvironment     testEnvironment;
//     private WebDriver           driver             = SenBotContext.getSeleniumDriver();
//     private String 				namespace		   = null;
// 	private List<ExpectedGlobalCondition> expectedGlobalConditions = new ArrayList<ExpectedGlobalCondition>();
// 
//     /**
//      * Constructor
//      */
//     public ScenarioGlobals() {
//         scenarioStart = System.currentTimeMillis();
//     }
// 
//     /**
//      * A map containing all scenario attributes
//      * 
//      * @param key The key
//      * @param value The value
//      */
//     public void setAttribute(String key, Object value) {
//         scenarioAttributes.put(key, value);
//     }
// 
//     /**
//      * @return A map containing all scenario attributes
//      */
//     public Object getAttribute(String key) {
//         return scenarioAttributes.get(key);
//     }
// 
//     /**
//      * Stores the time of creation of this {@link ScenarioGlobals} object so that we can use it what services
//      * are used during it's lifetime. For example used for checking if selenium is used or not.
//      * 
//      * @return scenarioStart
//      */
//     public Long getScenarioStart() {
//         return scenarioStart;
//     }
// 
//     /**
//      * Register loader with the {@link ScenarioGlobals} so the different Selenium services can wait for them to be removed
//      * @param loaderIndicators
//      */
//     public void registerLoaderIndicators(By... loaderIndicators) {
//     	for(By locator : loaderIndicators) {
//     		log.debug("Registered loader: " + locator);
//     		this.expectedGlobalConditions.add(new ExpectedWebElementCondition(locator));
//     	}
//     }
// 
//     /**
//      * Clear loader with the {@link ScenarioGlobals} so the different Selenium services can wait for them to be removed
//      */
//     public void clearExpectedGlobalConditions() {
//         this.expectedGlobalConditions.clear();
//     }
// 
//     /**
//      * @return The {@link TestEnvironment} this {@link Scenario} is running in
//      */
//     public TestEnvironment getTestEnvironment() {
//         return testEnvironment;
//     }
// 
//     /**
//      * @param testEnvironment The {@link TestEnvironment} this {@link Scenario} is running in
//      */
//     public void setTestEnvironment(TestEnvironment testEnvironment) {
//         this.testEnvironment = testEnvironment;
//     }
// 
//     /**
//      * @return a unique to this Scenario namespace string 
//      */
// 	public String getNameSpace() {
// 		if(namespace == null) {
// 			namespace = "SNS" + new Integer(UUID.randomUUID().hashCode()).toString() + "-";
// 		}
// 		return namespace;
// 	}
// 
// 	public List<ExpectedGlobalCondition> getExpectedGlobalConditions() {
// 		return expectedGlobalConditions;
// 	}
// 
// 	public void addExpectedGlobalConditions(
// 			ExpectedGlobalCondition expectedGlobalCondition) {
// 		expectedGlobalConditions.add(expectedGlobalCondition);
// 		
// 	}
// 
// }
// 
// Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarionCreationShutdownHook.java
// public interface ScenarionCreationShutdownHook {
// 	
// 	void scenarionStarted(ScenarioGlobals scenarioGlobals);
// 
// 	void scenarionShutdown(ScenarioGlobals scenarioGlobals);
// 	
// }


import org.openqa.selenium.By;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarioGlobals;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarionCreationShutdownHook;
import cucumber.api.Scenario;
package com.gfk.senbotdemo;




/**
 * The {@link ScenarionCreationShutdownHook} specific to the drive framework registering {@link Scenario} scoped
 * variables.
 */
public class ScenarioCreationHook implements ScenarionCreationShutdownHook {

	public static final By LOADER_INDICATOR = By.id("yourLoaderId");
	public static final By UI_DISABLER_INDICATOR = By.id("yourSecondLoaderId");
	
	/**
	 * Register the default loader locator so that the default selenium calls will always wait for this locator to be
	 * invisible before proceeding
	 */
	public void scenarionStarted(ScenarioGlobals scenarioGlobals) {
// Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
// 
// 	private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
//     private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//     private final Long          scenarioStart;
//     private TestEnvironment     testEnvironment;
//     private WebDriver           driver             = SenBotContext.getSeleniumDriver();
//     private String 				namespace		   = null;
// 	private List<ExpectedGlobalCondition> expectedGlobalConditions = new ArrayList<ExpectedGlobalCondition>();
// 
//     /**
//      * Constructor
//      */
//     public ScenarioGlobals() {
//         scenarioStart = System.currentTimeMillis();
//     }
// 
//     /**
//      * A map containing all scenario attributes
//      * 
//      * @param key The key
//      * @param value The value
//      */
//     public void setAttribute(String key, Object value) {
//         scenarioAttributes.put(key, value);
//     }
// 
//     /**
//      * @return A map containing all scenario attributes
//      */
//     public Object getAttribute(String key) {
//         return scenarioAttributes.get(key);
//     }
// 
//     /**
//      * Stores the time of creation of this {@link ScenarioGlobals} object so that we can use it what services
//      * are used during it's lifetime. For example used for checking if selenium is used or not.
//      * 
//      * @return scenarioStart
//      */
//     public Long getScenarioStart() {
//         return scenarioStart;
//     }
// 
//     /**
//      * Register loader with the {@link ScenarioGlobals} so the different Selenium services can wait for them to be removed
//      * @param loaderIndicators
//      */
//     public void registerLoaderIndicators(By... loaderIndicators) {
//     	for(By locator : loaderIndicators) {
//     		log.debug("Registered loader: " + locator);
//     		this.expectedGlobalConditions.add(new ExpectedWebElementCondition(locator));
//     	}
//     }
// 
//     /**
//      * Clear loader with the {@link ScenarioGlobals} so the different Selenium services can wait for them to be removed
//      */
//     public void clearExpectedGlobalConditions() {
//         this.expectedGlobalConditions.clear();
//     }
// 
//     /**
//      * @return The {@link TestEnvironment} this {@link Scenario} is running in
//      */
//     public TestEnvironment getTestEnvironment() {
//         return testEnvironment;
//     }
// 
//     /**
//      * @param testEnvironment The {@link TestEnvironment} this {@link Scenario} is running in
//      */
//     public void setTestEnvironment(TestEnvironment testEnvironment) {
//         this.testEnvironment = testEnvironment;
//     }
// 
//     /**
//      * @return a unique to this Scenario namespace string 
//      */
// 	public String getNameSpace() {
// 		if(namespace == null) {
// 			namespace = "SNS" + new Integer(UUID.randomUUID().hashCode()).toString() + "-";
// 		}
// 		return namespace;
// 	}
// 
// 	public List<ExpectedGlobalCondition> getExpectedGlobalConditions() {
// 		return expectedGlobalConditions;
// 	}
// 
// 	public void addExpectedGlobalConditions(
// 			ExpectedGlobalCondition expectedGlobalCondition) {
// 		expectedGlobalConditions.add(expectedGlobalCondition);
// 		
// 	}
// 
// }
// 
// Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarionCreationShutdownHook.java
// public interface ScenarionCreationShutdownHook {
// 	
// 	void scenarionStarted(ScenarioGlobals scenarioGlobals);
// 
// 	void scenarionShutdown(ScenarioGlobals scenarioGlobals);
// 	
// }


// Path: SenBotDemo/src/test/java/com/gfk/senbotdemo/ScenarioCreationHook.java
import org.openqa.selenium.By;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarioGlobals;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarionCreationShutdownHook;
import cucumber.api.Scenario;

package com.gfk.senbotdemo;




/**
 * The {@link ScenarionCreationShutdownHook} specific to the drive framework registering {@link Scenario} scoped
 * variables.
 */
public class ScenarioCreationHook implements ScenarionCreationShutdownHook {

	public static final By LOADER_INDICATOR = By.id("yourLoaderId");
	public static final By UI_DISABLER_INDICATOR = By.id("yourSecondLoaderId");
	
	/**
	 * Register the default loader locator so that the default selenium calls will always wait for this locator to be
	 * invisible before proceeding
	 */
	public void scenarionStarted(ScenarioGlobals scenarioGlobals) {
		scenarioGlobals.registerLoaderIndicators(LOADER_INDICATOR, UI_DISABLER_INDICATOR);