Currently, we have a collection of
[https://github.com/django/django/blob/7f7553dd30534d606c84952a3f6dcb64b396ce37/django/contrib/admin/tests.py#L49-L120
wait_for*] methods to accomplish this. The idea is to switch our code to
call `self.selenium.implicitly_wait(10)` after initializing
`self.selenium` which should allow us to remove many of these waiting
calls.
--
Ticket URL: <https://code.djangoproject.com/ticket/26048>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> From the selenium docs, "Dependent on several factors, including the
> OS/Browser combination, WebDriver may or may not wait for the page to
> load. In some circumstances, WebDriver may return control before the page
> has finished, or even started, loading. To ensure robustness, you need to
> wait for the element(s) to exist in the page using Explicit and Implicit
> Waits."
>
> Currently, we have a collection of
> [https://github.com/django/django/blob/7f7553dd30534d606c84952a3f6dcb64b396ce37/django/contrib/admin/tests.py#L49-L120
> wait_for*] methods to accomplish this. The idea is to switch our code to
> call `self.selenium.implicitly_wait(10)` after initializing
> `self.selenium` which should allow us to remove many of these waiting
> calls.
New description:
From the selenium docs, "Dependent on several factors, including the
OS/Browser combination, WebDriver may or may not wait for the page to
load. In some circumstances, WebDriver may return control before the page
has finished, or even started, loading. To ensure robustness, you need to
wait for the element(s) to exist in the page using
[http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-
implicit-waits-reference Explicit and Implicit Waits]."
Currently, we have a collection of
[https://github.com/django/django/blob/7f7553dd30534d606c84952a3f6dcb64b396ce37/django/contrib/admin/tests.py#L49-L120
wait_for*] methods to accomplish this. The idea is to switch our code to
call `self.selenium.implicitly_wait(10)` after initializing
`self.selenium` which should allow us to remove many of these waiting
calls.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:1>
Comment (by Tim Graham <timograham@…>):
In [changeset:"b2cddeaaf448234713f393749ceb1dbe22101f39" b2cddeaa]:
{{{
#!CommitTicketReference repository=""
revision="b2cddeaaf448234713f393749ceb1dbe22101f39"
Refs #26048 -- Fixed a flaky i18n selenium test: test_javascript_gettext.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:2>
* owner: nobody => timgraham
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:3>
* cc: apollo13 (added)
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/5968 PR]. Unfortunately, I think we
still need to keep some waits after actions like clicks if they aren't
followed by other selenium queries.
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:4>
Comment (by apollo13):
That is not so unfortunate, at least now we should be able to know when to
add them ;)
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"294d0d88158fa83eb095d663d054038ce9dfc3d4" 294d0d8]:
{{{
#!CommitTicketReference repository=""
revision="294d0d88158fa83eb095d663d054038ce9dfc3d4"
Fixed #26048 -- Made admin selenium tests use implicitly_wait()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"3486311a42728e0c9752bda16ac712797f5a6af9" 3486311]:
{{{
#!CommitTicketReference repository=""
revision="3486311a42728e0c9752bda16ac712797f5a6af9"
Refs #26048 -- Fixed a flaky selenium test.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26048#comment:7>