Thanks for the reply, it worked after I set the required details via Cygwin
export LT_USERNAME=user-name
export LT_ACCESS_KEY=access-key
export LT_URL=https://hub.lambdatest.com/wd/hub:
Once these are set, I run the following command:
docker run --rm -ti --name zalenium -p 4447:4444 -e LT_USERNAME -e LT_ACCESS_KEY -e LT_URL -v /c/Test_Videos:/home/seluser/videos -v /var/run/docker.sock:/var/run/docker.sock --privileged dosel/zalenium start --lambdaTestEnabled true
where recorded test video is available in C:\Test_Videos
Assuming that I am server is running at port 4447 and I want to use the LambdaTest capabilities (e.g. Safari 13.0 on MacOS Catalina), is it possible to do it with the Docker? If so, please share the code snippet.
I am currently using LambdaTest with Docker in the following manner:
public void setupLTCombination (String build, String name, String platformName,
String browserName, String browserVersion) throws MalformedURLException
{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("build", build);
capabilities.setCapability("name", name);
capabilities.setCapability("platformName", platformName);
capabilities.setCapability("browserName", browserName);
capabilities.setCapability("browserVersion",browserVersion);
capabilities.setCapability("tunnel",false);
capabilities.setCapability("network",true);
capabilities.setCapability("console",true);
capabilities.setCapability("visual",true);
String[] customTags = {""};
customTags[0] = platformName + " " + browserName + " " + browserVersion;
/* Setting Custom Tags */
capabilities.setCapability("tags", customTags);
/* End - Setting Custom Tags */
//This will not be hardcoded to Chrome for Safari (and other browsers), it is only for reference
ChromeOptions options = new ChromeOptions();
//driver.set(new RemoteWebDriver(new URL("http://" + username + ":" + access_key + "@hub.lambdatest.com/wd/hub"), capabilities));
driver.set(new RemoteWebDriver(new URL(remote_url), options));
}
where remote_url is set to “http://localhost:4447/wd/hub” I have installed the Selenium Hub and Firefox & Chrome nodes in the Hub but I wanted to check if I can run the test in Docker for other browser & OS combinations (using LambdaTest).
Here is what I see in the Grid Console
As expected, tests work fine with Firefox and Chrome (using Desired Capabilities or Options) but how I can use LambdaTest and Docker for other browser and OS combinations?