Repository navigation
feat: fill defaultTimeout in call_js_keyword when the caller leaves it out - #5354
Merged
Merged
Conversation
…s_keyword The generated keyword copied the streaming and decoding code of call_js_keyword. It now passes its arguments to call_js_keyword, so both routes send and read the same way. The json branch is dropped: Node returns every extension result as bodyPart chunks and never sets json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t out A Python library that calls a JavaScript extension function with call_js_keyword now gets the library timeout as defaultTimeout, as a generated keyword does. A value the caller passes still wins, for a library that keeps a timeout of its own. call_js_keyword gets a docstring and the jsextension docstring says who fills defaultTimeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rd_name The generated keyword passes its arguments to call_js_keyword by name, so an argument named keyword_name clashed with call_js_keyword's own first parameter. It is now positional-only. The jsextension docstring says a generated keyword always sends the library timeout, and the glossary uses the context's own terms for the two routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 17, 2026
d-biehl
added a commit
to d-biehl/robotframework-browser.org
that referenced
this pull request
Oct 17, 2026
MarketSquare/robotframework-browser#5354 makes call_js_keyword fill in defaultTimeout with the library timeout when the caller leaves it out. The Python example no longer passes it, a new bullet says when to pass your own, and the warning in the Python plugins guide names adoptContext and defaultTimeout as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A JavaScript extension keyword has two routes into Node: the generated keyword, and
call_js_keywordfor a Python library built on Browser. Only the generated keyword filled the injected argumentdefaultTimeout, although thejsextensiondocstring said the library fills it. Follow-up to #5318, on top of #5352.Set Browser Timeout.defaultTimeout, also to functions that do not declare it. Node passes a function only the names it declares, so nothing changes for them.keyword_nameis positional-only, so a JavaScript argument with that name no longer clashes with it.call_js_keywordgets a docstring; thejsextensiondocstring says who fillsdefaultTimeout.Browser/CONTEXT.mdnames JavaScript extension keyword and injected argument.Evidence
call_js_keyword("openOwnContext", url="https://a.b")sends[["url", "https://a.b"]]; the function getsdefaultTimeout === undefined.After: it sends
[["url", "https://a.b"], ["defaultTimeout", 7000]]; withdefaultTimeout=5000it sends 5000.utest/test_js_extension_call.py: 12 passed. New: filled when left out, the caller's value kept, an injected name the caller passes sent as"RESERVED", an argument namedkeyword_name. The test: characterize the generated JavaScript extension keyword #5352 tests guard the refactor unchanged, except that two payloads now end withdefaultTimeout.inv atest --suite "05 JS Tests": 59 passed;--suite "09 Plugins": 19 passed.Merge Danger
Door: two-way
Blast Radius: small
Libraries that call
call_js_keyword: a function that declaresdefaultTimeoutnow gets the library timeout instead ofundefinedwhen the caller leaves it out, and passingkeyword_name=by name now fails. A subclass that overridescall_js_keywordnow also sees generated keyword calls.🤖 Generated with Claude Code