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

adjusting webdriver-timeout #23

Open
tlipski opened this issue Oct 27, 2015 · 4 comments
Open

adjusting webdriver-timeout #23

tlipski opened this issue Oct 27, 2015 · 4 comments
Assignees

Comments

@tlipski
Copy link
Contributor

tlipski commented Oct 27, 2015

Right now the webdriver-timeout is bound to a symbol in a namespace and set to (* 15 1000). There are some cases, where the wait time should be longer (e.g. waiting for response from an external service).

One suggestion is to use (atom) just like with ui-maps to follow the convention.

Another is to use :^dynamic variable (I know, evil, but we're using atoms bound to symbols anyway). It has an advantage of self-cleanup when we need to adjust the timeout just for one operation.

What do you think?

@kamituel
Copy link
Contributor

Atom sounds fine I suppose. We could also create some helper fn/macro that would make it easier to temporarily change the timeout value, something like:

(with-timeout
  60000
  (wait-for ...)
  ...)

Or a bit more unorthodox:

(with-timeout
  :60-sec
  (wait-for ...)
  ...)

Where we would accept keywords or strings like :60-sec, :2-min etc. Would that read better?

@tlipski
Copy link
Contributor Author

tlipski commented Oct 27, 2015

yes, macro+function taking function as arg would be good too. I would refrain from :60-sec stuff, but rather rename the function to indicate the unit - e.g. with-webdriver-timeout-ms

@kamituel
Copy link
Contributor

Sounds good :)

@tlipski
Copy link
Contributor Author

tlipski commented Oct 27, 2015

excellent, I will make a PR then

@tlipski tlipski self-assigned this Oct 27, 2015
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

No branches or pull requests

2 participants