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

Wait uses Double instead of Number #570

Closed
mkutz opened this issue Mar 21, 2019 · 4 comments
Closed

Wait uses Double instead of Number #570

mkutz opened this issue Mar 21, 2019 · 4 comments
Assignees
Milestone

Comments

@mkutz
Copy link

mkutz commented Mar 21, 2019

I stumbled upon this while playing around with @CompileStatic. I noticed that every call like this browser.waitFor(3) { myPage.button } failed while browser.waitFor(3d) { myPage.button } works since the interface of waitFor actually requires a Double parameter.

Even without @CompileStatic Idea cannot determine the return type of waitFor and assumes Object, which prevents a lot of auto-completion and causes several warning in the IDE.

I don't see any reason why Wait cannot use Number instead of Double to fix this. If there are no objections, I'd file a PR for this.

@erdi
Copy link
Member

erdi commented Mar 22, 2019 via email

@mkutz
Copy link
Author

mkutz commented Mar 22, 2019

Why do you think it won't be backwards compatible? Number is a super-type of Double, so calling waitFor with Doubles will still work.

@erdi
Copy link
Member

erdi commented Mar 31, 2019

Sorry for a late response, I've been on holiday.

You are probably right, changing from double to a wider type of Number is not a breaking change.

@erdi erdi closed this as completed Mar 31, 2019
@erdi erdi reopened this Mar 31, 2019
@mkutz
Copy link
Author

mkutz commented Mar 31, 2019

I'm just back from Greach as well.

@erdi erdi added this to the 2.4 milestone Apr 4, 2019
@erdi erdi closed this as completed Apr 4, 2019
@erdi erdi modified the milestones: 2.4, 3.0 May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants