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