Ejemplo n.º 1
0
def given(tasks):

    if not has(s("#new-todo"), visible):
        open_todomvc()

    import json

    script = 'localStorage.setItem("todos-troopjs", "%s")' % (str(
        json.dumps(tasks)).replace('"', '\\"').replace(
            '\\\\"', '\\\\\\"').replace("False", "false"))

    execute_js(script)

    open_todomvc()
Ejemplo n.º 2
0
def given(tasks):

    if not has(s("#new-todo"), visible):
        open_todomvc()

    import json

    script = 'localStorage.setItem("todos-troopjs", "%s")' % (
        str(json.dumps(tasks))
        .replace('"', '\\"')
        .replace('\\\\"', '\\\\\\"')
        .replace("False", "false"))

    execute_js(script)

    open_todomvc()
Ejemplo n.º 3
0
def given_at_other_page():
    if not has(s("#order_details"), visible):
        get_driver().get('file://' + os.path.abspath(os.path.dirname(__file__)) + '/../resources/orderapp/order.html')
Ejemplo n.º 4
0
def given_at_other_page():
    if not has(s("#order_details"), visible):
        get_driver().get('file://' +
                         os.path.abspath(os.path.dirname(__file__)) +
                         '/../resources/orderapp/order.html')