Exemple #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()
Exemple #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()
Exemple #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')
Exemple #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')