Exemple #1
0
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
"""
Extended Selenium2 Library - a web testing library with AngularJS support.
"""

from robot.libraries.BuiltIn import BuiltIn
from Selenium2Library import Selenium2Library
from ExtendedSelenium2Library.decorators import inherit_docs
from ExtendedSelenium2Library.keywords import ExtendedElementKeywords
from ExtendedSelenium2Library.keywords import ExtendedFormElementKeywords
from ExtendedSelenium2Library.keywords import ExtendedJavascriptKeywords
from ExtendedSelenium2Library.keywords import ExtendedSelectElementKeywords
from ExtendedSelenium2Library.keywords import ExtendedWaitingKeywords
from ExtendedSelenium2Library.version import get_version

__version__ = get_version()


# pylint: disable=too-many-ancestors
@inherit_docs
class ExtendedSelenium2Library(Selenium2Library, ExtendedElementKeywords,
                               ExtendedFormElementKeywords,
                               ExtendedJavascriptKeywords,
                               ExtendedSelectElementKeywords,
                               ExtendedWaitingKeywords):
    # pylint: disable=line-too-long
    """ExtendedSelenium2Library is a [http://goo.gl/boVQia|Selenium2 (WebDriver)]
    web testing library with [https://goo.gl/Kzz8Y3|AngularJS] support and
    custom improvement for [http://goo.gl/lES6WM|Robot Framework].

    ExtendedSelenium2Library strives to make the transition from
Extended Selenium2 Library - a web testing library with AngularJS support.
"""

from ExtendedSelenium2Library.decorators import inherit_docs
from ExtendedSelenium2Library.locators import ExtendedElementFinder
from ExtendedSelenium2Library.version import get_version
from robot import utils
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support.expected_conditions import staleness_of, visibility_of
from Selenium2Library import Selenium2Library
from sys import exc_info
from time import sleep
from robot.libraries.BuiltIn import BuiltIn

__version__ = get_version()


# pylint: disable=too-many-ancestors
@inherit_docs
class ExtendedSelenium2Library(Selenium2Library):
    # pylint: disable=line-too-long
    """ExtendedSelenium2Library is a [http://goo.gl/boVQia|Selenium2 (WebDriver)]
    web testing library with [https://goo.gl/Kzz8Y3|AngularJS] support and
    custom improvement for [http://goo.gl/lES6WM|Robot Framework].

    ExtendedSelenium2Library strives to make the transition from
    [https://goo.gl/1VXDSI|Selenium2Library] as seamless as possible.
    It uses [http://goo.gl/boVQia|Selenium2 (WebDriver)] libraries
    and [https://goo.gl/Kzz8Y3|AngularJS] synchronization internally to control a web browser
    and ensure all the keywords stay in sync with [https://goo.gl/Kzz8Y3|AngularJS] process.