Skip to content

Way to resolve promise in page javascript? #234

Closed
@hkmaly

Description

@hkmaly

Could you add some way to resolve promise? evaluate('await something_returning_promise()') obviously doesn't work. evaluate_async('something_returning_promise()') doesn't work either (less obviously, returns timeout error). Tried to add method

def evaluate_await(expression, *args)
    expression = "function() { return %s }" % expression
    call(expression: expression, arguments: args, awaitPromise: true)
end

but, while it seems to do something, it returns {}. Also, monkey patching it in is quite complicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions