# Path: webdriverwrapper/wrapper.py
# class _ConvertToWebelementWrapper:
# class _WebdriverBaseWrapper:
# class _WebdriverWrapper(WebdriverWrapperErrorMixin, WebdriverWrapperInfoMixin, _WebdriverBaseWrapper):
# class _WebElementWrapper(_WebdriverBaseWrapper, WebElement):
# class _SelectWrapper(_WebElementWrapper, Select):
# class Chrome(_WebdriverWrapper, Chrome):
# class Firefox(_WebdriverWrapper, Firefox):
# class Ie(_WebdriverWrapper, Ie):
# class Opera(_WebdriverWrapper, Opera):
# class PhantomJS(_WebdriverWrapper, PhantomJS):
# class Remote(_WebdriverWrapper, Remote):
#     def __call__(self, f):
#         def wrapper(driver_self, *args, **kwds):
#     def _convert_result(cls, driver, res):
#     def _convert_into_webelementwrapper(cls, webelement):
#     def _make_instance(cls, element_class, webelement):
#     def contains_text(self, text):
#     def find_element_by_text(self, text):
#     def find_elements_by_text(self, text):
#     def click(self, *args, **kwds):
#     def get_elm(
#             self,
#             id_=None, class_name=None, name=None, tag_name=None, text=None, xpath=None,
#             parent_id=None, parent_class_name=None, parent_name=None, parent_tag_name=None,
#             css_selector=None
#     ):
#     def get_elms(
#             self,
#             id_=None, class_name=None, name=None, tag_name=None, text=None, xpath=None,
#             parent_id=None, parent_class_name=None, parent_name=None, parent_tag_name=None,
#             css_selector=None
#     ):
#     def find_element(self, by=By.ID, value=None):
#     def find_elements(self, by=By.ID, value=None):
#     def _get_seleniums_driver_class(self):
#     def _find_element_or_elements(self, callback, by, value):
#     def wait_for_element(self, timeout=None, message='', *args, **kwds):
#     def wait_for_element_show(self, timeout=None, message='', *args, **kwds):
#         def callback(driver):
#     def wait_for_element_hide(self, timeout=None, message='', *args, **kwds):
#         def callback(driver):
#     def wait(self, timeout=None):
#     def __init__(self, *args, **kwds):
#     def _driver(self):
#     def html(self):
#     def make_screenshot(self, screenshot_name=None):
#     def break_point(self):
#     def go_to(self, path=None, query=None):
#     def get_url(self, path=None, query=None):
#     def switch_to_window(self, window_name=None, title=None, url=None):
#     def close_window(self, window_name=None, title=None, url=None):
#     def close_other_windows(self):
#     def close_alert(self, ignore_exception=False):
#     def get_alert(self):
#     def wait_for_alert(self, timeout=None):
#         def alert_shown(driver):
#     def download_url(self, url=None):
#     def fill_out_and_submit(self, data, prefix='', turbo=False):
#     def fill_out(self, data, prefix='', turbo=False):
#     def __new__(cls, webelement):
#     def __init__(self, webelement):
#     def _driver(self):
#     def current_url(self):
#     def html(self):
#     def clear(self):
#     def download_file(self):
#     def __init__(self, webelement):


import logging
import unittest
import sys
import webdriverwrapper.exceptions as exceptions
from webdriverwrapper.wrapper import Firefox, Chrome, ChromeOptions
        """
        if not screenshot_name:
            # Without name (and possibly path) we cannot make screenshot. Don't
            # know where to store it.
            if not self.screenshot_path:
                return
            screenshot_name = self.id()

        # Close unexpected alerts (it's blocking and then tests fails completely).
        self.driver.close_alert(ignore_exception=True)

        self.driver.get_screenshot_as_file('%s/%s.png' % (self.screenshot_path, screenshot_name))

    def _set_up(self):
        self.__class__._number_of_test += 1
        if not hasattr(WebdriverTestCase, 'driver'):
            WebdriverTestCase.driver = self._get_driver()
            WebdriverTestCase.screenshot_path = self.screenshot_path
            WebdriverTestCase._main_window = WebdriverTestCase.driver.current_window_handle
            if self.domain:
                WebdriverTestCase.driver.get(self.domain)

        # Ensure that test starts in main window.
        if self.driver.current_window_handle != self._main_window:
            self.driver.switch_to_window(self._main_window)

    def _get_driver(self):
        """
        Create driver. By default it creates Firefox. Change it to your needs.
        """

# Path: webdriverwrapper/wrapper.py
# class _ConvertToWebelementWrapper:
# class _WebdriverBaseWrapper:
# class _WebdriverWrapper(WebdriverWrapperErrorMixin, WebdriverWrapperInfoMixin, _WebdriverBaseWrapper):
# class _WebElementWrapper(_WebdriverBaseWrapper, WebElement):
# class _SelectWrapper(_WebElementWrapper, Select):
# class Chrome(_WebdriverWrapper, Chrome):
# class Firefox(_WebdriverWrapper, Firefox):
# class Ie(_WebdriverWrapper, Ie):
# class Opera(_WebdriverWrapper, Opera):
# class PhantomJS(_WebdriverWrapper, PhantomJS):
# class Remote(_WebdriverWrapper, Remote):
#     def __call__(self, f):
#         def wrapper(driver_self, *args, **kwds):
#     def _convert_result(cls, driver, res):
#     def _convert_into_webelementwrapper(cls, webelement):
#     def _make_instance(cls, element_class, webelement):
#     def contains_text(self, text):
#     def find_element_by_text(self, text):
#     def find_elements_by_text(self, text):
#     def click(self, *args, **kwds):
#     def get_elm(
#             self,
#             id_=None, class_name=None, name=None, tag_name=None, text=None, xpath=None,
#             parent_id=None, parent_class_name=None, parent_name=None, parent_tag_name=None,
#             css_selector=None
#     ):
#     def get_elms(
#             self,
#             id_=None, class_name=None, name=None, tag_name=None, text=None, xpath=None,
#             parent_id=None, parent_class_name=None, parent_name=None, parent_tag_name=None,
#             css_selector=None
#     ):
#     def find_element(self, by=By.ID, value=None):
#     def find_elements(self, by=By.ID, value=None):
#     def _get_seleniums_driver_class(self):
#     def _find_element_or_elements(self, callback, by, value):
#     def wait_for_element(self, timeout=None, message='', *args, **kwds):
#     def wait_for_element_show(self, timeout=None, message='', *args, **kwds):
#         def callback(driver):
#     def wait_for_element_hide(self, timeout=None, message='', *args, **kwds):
#         def callback(driver):
#     def wait(self, timeout=None):
#     def __init__(self, *args, **kwds):
#     def _driver(self):
#     def html(self):
#     def make_screenshot(self, screenshot_name=None):
#     def break_point(self):
#     def go_to(self, path=None, query=None):
#     def get_url(self, path=None, query=None):
#     def switch_to_window(self, window_name=None, title=None, url=None):
#     def close_window(self, window_name=None, title=None, url=None):
#     def close_other_windows(self):
#     def close_alert(self, ignore_exception=False):
#     def get_alert(self):
#     def wait_for_alert(self, timeout=None):
#         def alert_shown(driver):
#     def download_url(self, url=None):
#     def fill_out_and_submit(self, data, prefix='', turbo=False):
#     def fill_out(self, data, prefix='', turbo=False):
#     def __new__(cls, webelement):
#     def __init__(self, webelement):
#     def _driver(self):
#     def current_url(self):
#     def html(self):
#     def clear(self):
#     def download_file(self):
#     def __init__(self, webelement):


# Path: webdriverwrapper/unittest/testcase.py
import logging
import unittest
import sys
import webdriverwrapper.exceptions as exceptions
from webdriverwrapper.wrapper import Firefox, Chrome, ChromeOptions

        """
        if not screenshot_name:
            # Without name (and possibly path) we cannot make screenshot. Don't
            # know where to store it.
            if not self.screenshot_path:
                return
            screenshot_name = self.id()

        # Close unexpected alerts (it's blocking and then tests fails completely).
        self.driver.close_alert(ignore_exception=True)

        self.driver.get_screenshot_as_file('%s/%s.png' % (self.screenshot_path, screenshot_name))

    def _set_up(self):
        self.__class__._number_of_test += 1
        if not hasattr(WebdriverTestCase, 'driver'):
            WebdriverTestCase.driver = self._get_driver()
            WebdriverTestCase.screenshot_path = self.screenshot_path
            WebdriverTestCase._main_window = WebdriverTestCase.driver.current_window_handle
            if self.domain:
                WebdriverTestCase.driver.get(self.domain)

        # Ensure that test starts in main window.
        if self.driver.current_window_handle != self._main_window:
            self.driver.switch_to_window(self._main_window)

    def _get_driver(self):
        """
        Create driver. By default it creates Firefox. Change it to your needs.
        """

        return Firefox()