How can I pass Desired capabilities in Selenium 3 with PHPUnit?
Hi Emma!
To pass Desired capabilities with PHPUnit in Selenium 3, you can refer to the below code snippet.
protected function driver()
{
$username = env('LT_USERNAME');
$access_key = env('LT_ACCESS_KEY');
$url = ""https://"".$username."":"".$access_key.""@hub.lambdatest.com/wd/hub"";
$capabilities = array(
""build"" => ""LaravelDusk Build"",
""name"" => ""LaravelDusk Build"",
""platform"" => ""Windows 10"",
""browserName"" => ""Chrome"",
""version"" => ""latest""
);
return RemoteWebDriver::create($url,$capabilities);
}
}
For more details, check our documentation.