Open uuf6429 opened 3 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.37%. Comparing base (
ca55cde
) to head (25d1859
). Report is 1 commits behind head on main.
:white_check_mark: All tests successful. No failed tests found.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
🚨 Try these New Features:
Since we're not mocking the underlying WebDriver library to confirm, that proper desired capabilities were given at session creation time, then we should fall back to a functional test (like with timeouts) to indirectly confirm, that the correct desired capabilities were given.
@uuf6429 , any ideas?
thus, this driver does not have a stable release yet. So there is no BC guarantee yet.
Since we're not mocking the underlying WebDriver library to confirm, that proper desired capabilities were given at session creation time
@aik099 Why not? I can simply use an anonymous subclass to test that.
Anyway, you can look at my take on it when I push it soon.
Side-note: Currently there's no way to unset top-level capabilities, except with potentially wrong values (e.g. to "unset" 'name'
one would need to pass ['name' => null]
- which is more like invalidation than unsetting, and might still affect selenium).
I don't know if this is significant. One possible way is to define a constant/special value as a amrker:
class WebDriver {
public const CAPABILITY_UNSET = '{[%unset%]}';
...
$capabilities = array_filter(
array_merge(
$capabilities1,
$capabilities2,
$capabilities3
),
function ($value) {
return $value !== self::CAPABILITY_UNSET;
}
);
Alternatively, a singleton (and later on, enums) could be used:
final class Capabilities
{
private function __construct(){}
public static function UNSET(): self
{
static $unset = null;
return $unset ?? ($unset = new self());
}
}
Come to think of it, we could also consider adding this functionality later if needed - it should be backword compatible.
Fixes #46.
What Changed
Remaining Questions