-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(driverProvider): Add useExistingWebDriver driver provider #4756
feat(driverProvider): Add useExistingWebDriver driver provider #4756
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
1 similar comment
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
Please check my CLA! |
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
@qiyigg Any thoughts on this? |
Hi, any chance of this PR being merged? |
* It is responsible for setting up the account object, tearing it down, and | ||
* setting up the driver correctly. | ||
*/ | ||
import * as q from 'q'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for a simple question, but why you can not use async ... await
construction instead of q
library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly copied the code from another driver provider, but I could redo my PR with async/await
if that helps it getting merged. I don't exactly know what the house rules are for protractor code but I didn't see anything prohibiting q
, fwiw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The driver providers were written before Promise was available in Node.js.
Probably it's fine to use async/await for new driver provider, but I am not sure whether it will just work since some other folks tried to refactor them using regular promise, but it turns out not easy. Since all the other driver providers are using q promise, I am also ok with q promise for this one.
merged, thanks |
Discussion on driverProviderUseExistingSo I'm working on this selenium upgrade process to 4. I understand the idea of this PR; however, I don't think this actually accomplishes the desired task. The selenium session should be passed to the constructor in 4.
We might already do thisThe code provided looks and feels like if I was using an existing selenium server which is already defined here: https://github.com/angular/protractor/blob/master/lib/driverProviders/driverProvider.ts#L46 The only difference here that I can tell is that you are making the person writing the test also create the webdriver instance. Moving forward, attachToSession is being changed and we need to work on fixing the existing one. |
Hi @cnishina - you are correct, my intent with If there's a replacement for what the current Thank you btw for working on the upgrade 🎉 |
No description provided.