This repository was archived by the owner on Dec 26, 2019. It is now read-only.
This repository was archived by the owner on Dec 26, 2019. It is now read-only.
How can i change WebdriverAgent port with command-line parameters ? #538
Closed
Description
I try to change 8100 port to anything else over command-line in order to perform the parallel execution. I saw that it is possible to change port at FBConfigurationTests
.
Is there any possible way to change port over command-line?
I tried below line to change port but it failed.
xcodebuild -configuration WebDriverAgent USE_PORT 8200
+ (NSRange)bindingPortRange
{
// 'WebDriverAgent --port 8080' can be passed via the arguments to the process
if (self.bindingPortRangeFromArguments.location != NSNotFound) {
return self.bindingPortRangeFromArguments;
}
#
// Existence of USE_PORT in the environment implies the port range is managed by the launching process.
if (NSProcessInfo.processInfo.environment[@"USE_PORT"]) {
return NSMakeRange([NSProcessInfo.processInfo.environment[@"USE_PORT"] integerValue] , 1);
}
return NSMakeRange(DefaultStartingPort, DefaultPortRange);
}
Activity
marekcirkos commentedon Apr 6, 2017
You can definitely modify scheme to do it, not sure if you can do it from command line
cyildirim commentedon Apr 6, 2017
Hi Marek,
Thanks for your answer. So I understand that it possibly needs code implementation to change port over command line. If yes you can close this ticket. Probably , I am going to fork it and work on it.
marekcirkos commentedon Apr 6, 2017
@cyildirim You can already change port by passing either arg or env. Problem here is Xcode needs to pass them to WDA. You can definitely do this via scheme definition, I am not sure if xcodebuild supports it from command line
cyildirim commentedon Apr 7, 2017
I had able to use over xcodebuild after edit scheme like this
Thanks !
Move resources lock to the top hierarchy layer (#538)