-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
[java] have overloaded constructors to have configurable connect and read timeouts while instantiating WebDriver object #11532
Conversation
…le connect and read timeouts.
I don't love the idea of creating new constructors for each of the drivers, and if we do go that route, we should implement the full ClientConfig rather than just these 2 values. Also, this is missing Edge & IE support, and for this kind of implementation we'd want to set default values and have the old constructors consume the new constructor using those values. (important because of the upcoming changes to driver classes with |
+1 to what @titusfortner says. Timeouts can be set already through the builder, we are figuring out how to avoid the user needing to set a default value. |
@titusfortner @diemol First of all thanks for your feedback. As rightly pointed out this was missing Edge and IE support initially. That has now been updated. |
I generally agree that even though it *can be done with the builder, you aren't working with a But, I don't think we just want to tack on extra timeout values. Instead of:
we should figure out how to implement:
It actually looks like that might be easier to implement? I'm not following some of the changes being made here, so I'd need to pull it and test it to make sure it is actually doing what we want. What I meant by using defaults and consume is something like:
One constructor uses the other with a default instead of duplicating logic. That way when I go to make a change in the constructor logic, I only have to do it in one place. This is actually easier if we use
|
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.
We have been chatting internally and we think it makes sense to add the extra constructor to define the timeout locally. However, we'd prefer if a ClientConfig
is passed instead of the two variables. @krmahadevan has helped to illustrate this in #11545, perhaps you can get inspiration from there and get this PR in shape. If you need more help, please reach out to us in the Slack channel #selenium-tlc, https://www.selenium.dev/support/.
Thank you for putting this together.
Hi @diemol Thanks for your feedback! |
Perfect, let us know if you need any help. |
…ect instantiation.
Dear @diemol. |
java/src/org/openqa/selenium/grid/node/CustomLocatorHandler.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/remote/RemoteWebDriverBuilder.java
Outdated
Show resolved
Hide resolved
java/src/org/openqa/selenium/remote/service/DriverCommandExecutor.java
Outdated
Show resolved
Hide resolved
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.
Left some additional comments, @code-with-abdullah.
Great. Bundle of thanks to both of you for your precious feedback. I shall integrate all changes mentioned above and build the code as suggested before my next commit. |
@diemol and @krmahadevan Thanks for your input on the PR. All the changes you requested have been integrated. Please review and let me know if any further changes are required. |
@diemol Resolved |
@krmahadevan @diemol requested changes are done, pr please |
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.
@diemol the changes look good to me. Please help take a look incase, I missed something.
@diemol please let us know if any change needed, we really hope to get this resolved and released with 4.9. |
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.
Thank you, @code-with-abdullah!
Thanks for you help, @krmahadevan!
Thanks a lot @diemol |
Currently the code only has 10 seconds set as connect timeout and 3 minutes set as read timeout.
This fix will allow this to configurable at constructor level i.e you now have a separate constructor for ChromeDriver that supports read timeout and connect timeout as well.