Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add chromedriverPorts cap which allows specifying multiple ports or a range #529

Merged
merged 4 commits into from
Apr 5, 2019

Conversation

jlipps
Copy link
Member

@jlipps jlipps commented Apr 3, 2019

this helps support the multiple webview case, and would provide a supported 'workaround' for e.g. appium/appium#11820

@jlipps
Copy link
Member Author

jlipps commented Apr 3, 2019

oh, also deprecate chromeDriverPort in favor of the more standard chromedriverPort, for parity with all our other chromedriver caps

@jlipps
Copy link
Member Author

jlipps commented Apr 4, 2019

while i was in there i also removed a discrepancy where the bootstrapPort opt was only a CLI opt and not a desired cap. now it can be either like all the rest.

@jlipps jlipps requested review from imurchie and KazuCocoa and removed request for imurchie April 4, 2019 04:29
// defining a port range
log.debug(`Finding a free port for chromedriver using spec ${JSON.stringify(opts.chromedriverPorts)}`);
let foundPort = null;
for (let potentialPort of opts.chromedriverPorts) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const?

@@ -265,16 +265,64 @@ async function setupExistingChromedriver (chromedriver) {
return chromedriver;
}

async function getChromedriverPort (opts) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring?

opts.chromeDriverPort = await getPort();
log.debug(`A port was not given, using random port: ${opts.chromeDriverPort}`);
if (opts.chromeDriverPort) {
log.warn(`The 'chromeDriverPort' capability is deprecated. Please use 'chromedriverPort' instead`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jlipps
Copy link
Member Author

jlipps commented Apr 4, 2019

ok, feedback addressed. this PR now also depends on appium/appium-base-driver#314

@jlipps jlipps force-pushed the jlipps/chromedriverport branch from 02d0e96 to 49155e4 Compare April 4, 2019 17:45
@KazuCocoa
Copy link
Member

a note need to update after this:

@jlipps jlipps merged commit 50c7968 into master Apr 5, 2019
@jlipps jlipps deleted the jlipps/chromedriverport branch April 5, 2019 16:33
@jlipps
Copy link
Member Author

jlipps commented Apr 5, 2019

published in 4.14.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants