Beispiel #1
0
def given(*tasks):

    if not satisfied(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()
Beispiel #2
0
def given_at_other_page():
    if not satisfied(s("#order_details"), visible):
        driver().get(OTHER_PAGE_URL)