Example #1
0
def load_selenium(jalangi):
    import selenium_util
    selenium_util.set_chromedriver_loc(
        os.path.abspath(
            os.path.join(
                jalangi.get_home(), "thirdparty", "chromedriver.exe"
                if sys.platform == 'win32' else "chromedriver")))
    return selenium_util
Example #2
0
def load_selenium(jalangi):
    import selenium_util
    selenium_util.set_chromedriver_loc(os.path.abspath(os.path.join(jalangi.get_home(),
                                                                      "thirdparty",
                                                                      "chromedriver.exe" if sys.platform == 'win32' else "chromedriver")))
    return selenium_util
import os
import subprocess
scriptpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),"../../src/python/")
sys.path.insert(0,scriptpath)
import commands
import selenium_util
import util
from selenium.common.exceptions import WebDriverException


script = sys.argv[1]

jalangi = util.DEFAULT_INSTALL

selenium_util.set_chromedriver_loc(os.path.abspath(os.path.join(jalangi.get_home(),
                                                                "thirdparty",
                                                                "chromedriver.exe" if sys.platform == 'win32' else "chromedriver")))

try:
    norm = selenium_util.run_normal(script)
    if norm != "":
        print "something went wrong "
        print norm
        exit(0)
except WebDriverException as e:
    # deliberately printing on stdout,
    # as we don't want this as part of the error message
    print "WebDriverException"
    print e
    exit(0)
    
Example #4
0
scriptpath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                          "../../src/python/")
sys.path.insert(0, scriptpath)
import commands
import selenium_util
import util
from selenium.common.exceptions import WebDriverException

script = sys.argv[1]

jalangi = util.DEFAULT_INSTALL

selenium_util.set_chromedriver_loc(
    os.path.abspath(
        os.path.join(
            jalangi.get_home(), "thirdparty", "chromedriver.exe"
            if sys.platform == 'win32' else "chromedriver")))

try:
    norm = selenium_util.run_normal(script)
    if norm != "":
        print "something went wrong "
        print norm
        exit(0)
except WebDriverException as e:
    # deliberately printing on stdout,
    # as we don't want this as part of the error message
    print "WebDriverException"
    print e
    exit(0)