Support getting current timeouts in sync w3c drivers.
Uses the W3C "Get Timeouts" API: https://www.w3.org/TR/webdriver1/#get-timeouts
There is no such API in the JSON API: https://www.selenium.dev/documentation/legacy/json_wire_protocol/#command-summary
Rationale: Allows sync clients to temporarily change a timeout and then restore it back to what it was before (which doesn't work for async clients anyway).
Tested: Against geckodriver, and internally against Chrome.
Implements #280.
@devoncarew do you know the best person to review this?
Allows sync clients
I had the understanding we wanted to move away from the sync client. The sync_http package it relies on is pretty hacky IIRC, and there are significant risks around blocking the isolate while waiting for webdriver requests.
Why are we adding new sync-only features?
which doesn't work for async clients anyway
Why doesn't it work for async clients?
which doesn't work for async clients anyway
Why doesn't it work for async clients?
@parren-google - can you help me understand this constraint?
which doesn't work for async clients anyway
Why doesn't it work for async clients?
@parren-google - can you help me understand this constraint?
Sorry, that was a misunderstanding from my side. I thought the async driver used the JSON API. But it can also use W3C, so we can support getting timeouts in the aysnc driver too.
which doesn't work for async clients anyway
Why doesn't it work for async clients?
@parren-google - can you help me understand this constraint?
Sorry, that was a misunderstanding from my side. I thought the async driver used the JSON API. But it can also use W3C, so we can support getting timeouts in the aysnc driver too.
However, the current async_timeouts_test.dart uses defaultSpec from common_config.dart, which is WebDriverSpec.JsonWire. Should we then introduce W3C variants of the async tests? Or switch to WebDriverSpec.Auto?