// Path: gepard-selenium/src/main/java/com/epam/gepard/selenium/helper/EnvironmentHelper.java
// public class EnvironmentHelper {
//     private Environment environment;
// 
//     /**
//      * Default constructor.
//      * @param environment is the parent environment class of Gepard.
//      */
//     public EnvironmentHelper(Environment environment) {
//         this.environment = environment;
//     }
// 
//     public String getTestEnvironmentURL() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".url");
//     }
// 
//     public String getTestEnvironmentURLSecure() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".url.secure");
//     }
// 
//     /**
//      * Gets the browser that is specified to thi specific TSID.
//      * @return with the TSID specific browser string.
//      */
//     public String getTestEnvironmentBrowser() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".browser");
//     }
// 
//     /**
//      * Simple wrapper ofor getting environment properties.
//      * @param propertyKey is the key of the property.
//      * @return with property value.
//      */
//     public String getProperty(final String propertyKey) {
//         return environment.getProperty(propertyKey);
//     }
// 
//     /**
//      *
//      * Simple wrapper ofor getting environment properties.
//      * @param propertyKey is the key of the property.
//      * @param defaultValue is the default value, if parameter was not found.
//      * @return with property value.
//      */
//     public String getProperty(final String propertyKey, final String defaultValue) {
//         return environment.getProperty(propertyKey, defaultValue);
//     }
// }


import com.epam.gepard.exception.SimpleGepardException;
import com.epam.gepard.generic.GepardTestClass;
import com.epam.gepard.selenium.helper.EnvironmentHelper;
import com.epam.gepard.util.FileUtil;
import com.epam.gepard.util.Util;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleniumException;
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
import org.apache.http.client.utils.URIBuilder;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;
package com.epam.gepard.selenium.browsers;

/*==========================================================================
 Copyright 2004-2015 EPAM Systems

 This file is part of Gepard.

 Gepard is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Gepard is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Gepard.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/



/**
 * Utility functions for Selenium.
 *
 * @author Tamas_Kohegyi
 */

public class WebDriverUtil {

    public static final String SELENIUM_PORT = "gepard.selenium.port";
    public static final String SELENIUM_HOST = "gepard.selenium.host";

    public static final String DEFAULT_TIMEOUT = "30000";

    public static final String SELENIUM_BROWSER_FIREFOX = "gepard.selenium.browserString.FF";
    public static final String SELENIUM_BROWSER_INTERNET_EXPLORER = "gepard.selenium.browserString.IE";
    public static final String SELENIUM_BROWSER_GOOGLE_CHROME = "gepard.selenium.browserString.GoogleChrome";
    public static final String SELENIUM_BROWSER_SAFARI = "gepard.selenium.browserString.Safari";
    private static final long WEB_DRIVER_SHUTDOWN_DELAY = 5000;
    private static int dumpFileCount;
    private GepardTestClass tc;

    /**
     * WebDriver main object.
     */
    private WebDriver webDriver;
    /**
     * Selenium main object.
     */
    private Selenium selenium;


    /**
     * Environment extender.
     */
// Path: gepard-selenium/src/main/java/com/epam/gepard/selenium/helper/EnvironmentHelper.java
// public class EnvironmentHelper {
//     private Environment environment;
// 
//     /**
//      * Default constructor.
//      * @param environment is the parent environment class of Gepard.
//      */
//     public EnvironmentHelper(Environment environment) {
//         this.environment = environment;
//     }
// 
//     public String getTestEnvironmentURL() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".url");
//     }
// 
//     public String getTestEnvironmentURLSecure() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".url.secure");
//     }
// 
//     /**
//      * Gets the browser that is specified to thi specific TSID.
//      * @return with the TSID specific browser string.
//      */
//     public String getTestEnvironmentBrowser() {
//         return environment.getProperty("env." + environment.getTestEnvironmentID() + ".browser");
//     }
// 
//     /**
//      * Simple wrapper ofor getting environment properties.
//      * @param propertyKey is the key of the property.
//      * @return with property value.
//      */
//     public String getProperty(final String propertyKey) {
//         return environment.getProperty(propertyKey);
//     }
// 
//     /**
//      *
//      * Simple wrapper ofor getting environment properties.
//      * @param propertyKey is the key of the property.
//      * @param defaultValue is the default value, if parameter was not found.
//      * @return with property value.
//      */
//     public String getProperty(final String propertyKey, final String defaultValue) {
//         return environment.getProperty(propertyKey, defaultValue);
//     }
// }


// Path: gepard-selenium/src/main/java/com/epam/gepard/selenium/browsers/WebDriverUtil.java
import com.epam.gepard.exception.SimpleGepardException;
import com.epam.gepard.generic.GepardTestClass;
import com.epam.gepard.selenium.helper.EnvironmentHelper;
import com.epam.gepard.util.FileUtil;
import com.epam.gepard.util.Util;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleniumException;
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
import org.apache.http.client.utils.URIBuilder;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.text.SimpleDateFormat;
import java.util.Date;

package com.epam.gepard.selenium.browsers;

/*==========================================================================
 Copyright 2004-2015 EPAM Systems

 This file is part of Gepard.

 Gepard is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 Gepard is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Gepard.  If not, see <http://www.gnu.org/licenses/>.
===========================================================================*/



/**
 * Utility functions for Selenium.
 *
 * @author Tamas_Kohegyi
 */

public class WebDriverUtil {

    public static final String SELENIUM_PORT = "gepard.selenium.port";
    public static final String SELENIUM_HOST = "gepard.selenium.host";

    public static final String DEFAULT_TIMEOUT = "30000";

    public static final String SELENIUM_BROWSER_FIREFOX = "gepard.selenium.browserString.FF";
    public static final String SELENIUM_BROWSER_INTERNET_EXPLORER = "gepard.selenium.browserString.IE";
    public static final String SELENIUM_BROWSER_GOOGLE_CHROME = "gepard.selenium.browserString.GoogleChrome";
    public static final String SELENIUM_BROWSER_SAFARI = "gepard.selenium.browserString.Safari";
    private static final long WEB_DRIVER_SHUTDOWN_DELAY = 5000;
    private static int dumpFileCount;
    private GepardTestClass tc;

    /**
     * WebDriver main object.
     */
    private WebDriver webDriver;
    /**
     * Selenium main object.
     */
    private Selenium selenium;


    /**
     * Environment extender.
     */
    private EnvironmentHelper environmentHelper;