Skip to content

Commit

Permalink
[#323] improve session name for test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
oomelianchuk committed Dec 13, 2024
1 parent 877c0e4 commit d638ef6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ else if (Neodymium.configuration().useProxy())
var remoteDebuggingPort = PortProber.findFreePort();
Neodymium.setRemoteDebuggingPort(remoteDebuggingPort);
options.addArguments("--remote-debugging-port=" + remoteDebuggingPort);

if (config.getArguments() != null && config.getArguments().size() > 0)
{
options.addArguments(config.getArguments());
Expand Down Expand Up @@ -361,18 +361,18 @@ else if (edgeBrowsers.contains(browserName))

final String driverInPathPath = new ExecutableFinder().find("msedgedriver");
final EdgeOptions options = new EdgeOptions().merge(capabilities);

if (config.getArguments() != null && config.getArguments().size() > 0)
{
options.addArguments(config.getArguments());
}

EdgeBuilder edgeBuilder = new EdgeBuilder(config.getDriverArguments());
if (StringUtils.isNotBlank(driverInPathPath))
{
edgeBuilder.usingDriverExecutable(new File(driverInPathPath));
}

wDSC.setWebDriver(new EdgeDriver(edgeBuilder.build(), options));
}
else if (safariBrowsers.contains(browserName))
Expand Down Expand Up @@ -404,7 +404,7 @@ else if (safariBrowsers.contains(browserName))
config.getGridProperties().put("userName", testEnvironmentProperties.getUsername());
config.getGridProperties().put("accessKey", testEnvironmentProperties.getPassword());
final String buildId = StringUtils.isBlank(System.getenv("BUILD_NUMBER")) ? "local run" : System.getenv("BUILD_NUMBER");
config.getGridProperties().put("sessionName", testClassInstance.getClass().toString());
config.getGridProperties().put("sessionName", testClassInstance instanceof String ? testClassInstance : testClassInstance.getClass().toString());
config.getGridProperties().put("buildName", "Test Automation");
config.getGridProperties().put("buildIdentifier", buildId);
if (testEnvironmentUrl.contains("browserstack"))
Expand Down

0 comments on commit d638ef6

Please sign in to comment.