(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)
Something that I noticed just now is that for older releases of Firefox that will not support the
webSocketUrl capability, Marionette would just pass through the capability and as such return it as
true. As such when we add support for this capability to geckodriver we have to make sure to filter it out if the return value isn't a string type. The Bidi spec isn't clear here what should be returned, and maybe a pass-through should also be avoided?
As discussed with James earlier today we always want to know as early as possible if a required capability is supported or not, and as such might even not have to start Firefox. But in case of
webSocketUrl it's more difficult because:
- Older Firefox releases don't support BiDi
- Upcoming beta releases won't have Bidi enabled by default as long as BiDi isn't stable enough
Especially because of 2) there is no way to detect BiDi support before launching Firefox. As such it would be good to start simple and rely on the
webSocketUrl capability as passed back. If it's
true, which happens for older releases, geckodriver would have to immediately delete the new session again and return an error.
For Firefox 90 we want to get bug 1713775 fixed so that Marionette doesn't pass-through unknown capabilities. As such already Marionette would raise a
session not created error, and geckodriver won't have to destroy the session.
Ultimately Marionette would have to do the merge of
firstMatch capabilities, and do the validation checks. But that we want to defer until
session.new() gets implemented in bug 1713784.