<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2015 Cutting Edge QA

import os
import robot
from robot.libraries.BuiltIn import BuiltIn
from Selenium2Library import Selenium2Library


class SeleniumExtentions(object):
    TIMEOUT_LONG = "60 sec"
    TIMEOUT = "2 sec"
    WIDTH_DEFAULT = "1920"
    HEIGHT_DEFAULT = "1200"
    SELENIUM_SPEED = "0 sec"
    SELENIUM_TEST_BROWSER = "ff"
    XPATH2_JS = "if(!window.jQuery){var headID = document.getElementsByTagName(\"head\")[0]; var newScript = document.createElement('script'); newScript.type='text/javascript'; newScript.src='http://code.jquery.com/jquery-2.1.4.min.js'; headID.appendChild(newScript);}"

    def __int__(self):
        self.SELENIUM_TEST_BROWSER = "ff"

    def open_browser_custom_size(self, url, width=WIDTH_DEFAULT, heigh=HEIGHT_DEFAULT, alias=None,
                                 browser=SELENIUM_TEST_BROWSER, remote_url=False, desired_capabilities=None):
        Selenium2Library.open_browser(self, url, browser, alias, remote_url, desired_capabilities)
        Selenium2Library.set_window_size(self, width, heigh)
        Selenium2Library.set_selenium_speed(self, self.SELENIUM_SPEED)
        # add handling rally screenshots

    def click_element_extended(self, locator, timeout=None, error=None):
        Selenium2Library.wait_until_page_contains_element(self, locator, timeout, error)
        Selenium2Library.wait_until_element_is_visible(self, locator, timeout, error)<commit_msg>add selenium extentions<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (c) 2015 Cutting Edge QA

import os
import robot
from robot.libraries.BuiltIn import BuiltIn
from Selenium2Library import Selenium2Library


class SeleniumExtentions(Selenium2Library):
    TIMEOUT_LONG = "60 sec"
    TIMEOUT = "2 sec"
    WIDTH_DEFAULT = "1920"
    HEIGHT_DEFAULT = "1200"
    SELENIUM_SPEED = "0 sec"
    SELENIUM_TEST_BROWSER = "ff"
    XPATH2_JS = "if(!window.jQuery){var headID = document.getElementsByTagName(\"head\")[0]; var newScript = document.createElement('script'); newScript.type='text/javascript'; newScript.src='http://code.jquery.com/jquery-2.1.4.min.js'; headID.appendChild(newScript);}"

    def __int__(self):
        self.SELENIUM_TEST_BROWSER = "ff"

    def open_browser_custom_size(self, url, width=WIDTH_DEFAULT, heigh=HEIGHT_DEFAULT, alias=None,
                                 browser=SELENIUM_TEST_BROWSER, remote_url=False, desired_capabilities=None):
        Selenium2Library.open_browser(self, url, browser, alias, remote_url, desired_capabilities)
        Selenium2Library.set_window_size(self, width, heigh)
        Selenium2Library.set_selenium_speed(self, self.SELENIUM_SPEED)
        # add handling rally screenshots

    def click_element_extended(self, locator, timeout=None, error=None):
        Selenium2Library.wait_until_page_contains_element(self, locator, timeout, error)
        Selenium2Library.wait_until_element_is_visible(self, locator, timeout, error)
{'fraction_non_alphanumeric': 0.10505319148936171, 'fraction_numerical': 0.01961436170212766, 'mean_word_length': 4.421621621621622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '235602', 'n_tokens_mistral': 1036, 'n_tokens_neox': 974, 'n_words': 181}