Hi,

I am using the Selenium 2.0 WebDriver interface. Sometimes after calling
click() on a link element, I have to use waitForElement to access the
resulting page; if I use getElement, it will fail to find the element from
time to time. This suggests that WebDriver isn't really waiting for the
page to load before returning. I am using the Firefox variant of the
driver. The link is just a simple link (no javascript) and the resulting
page is a very simple page (elements generated on the server side and none
by javascript). There is no ajax involved.

I wonder if this could be a bug? In Selenium 1.0 there has never been such
a problem.

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/OOXKT8M8x2UJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mike Riley at Aug 20, 2012 at 4:18 pm
    Have you configured implicit waits?

    Selenium 2.0 does not have the same concept of waiting for a page to load
    as the 1.0 API did. Setting an implicit wait time can help with that.

    Mike
    On Sunday, August 19, 2012 10:29:48 PM UTC-7, Kent Tong wrote:

    Hi,

    I am using the Selenium 2.0 WebDriver interface. Sometimes after calling
    click() on a link element, I have to use waitForElement to access the
    resulting page; if I use getElement, it will fail to find the element from
    time to time. This suggests that WebDriver isn't really waiting for the
    page to load before returning. I am using the Firefox variant of the
    driver. The link is just a simple link (no javascript) and the resulting
    page is a very simple page (elements generated on the server side and none
    by javascript). There is no ajax involved.

    I wonder if this could be a bug? In Selenium 1.0 there has never been such
    a problem.

    Thanks in advance!
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/U-P-iT2a_UgJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Kent Tong at Aug 21, 2012 at 10:02 am
    Thanks! Now the document does reflect this, even though the API doc says
    otherwise (http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html
    ):

    ...Load a new web page in the current browser window. This is done using
    an HTTP GET operation, and the method will block until the load is
    complete.

    so, the API doc is incorrect?
    On Monday, August 20, 2012 1:29:48 PM UTC+8, Kent Tong wrote:

    Hi,

    I am using the Selenium 2.0 WebDriver interface. Sometimes after calling
    click() on a link element, I have to use waitForElement to access the
    resulting page; if I use getElement, it will fail to find the element from
    time to time. This suggests that WebDriver isn't really waiting for the
    page to load before returning. I am using the Firefox variant of the
    driver. The link is just a simple link (no javascript) and the resulting
    page is a very simple page (elements generated on the server side and none
    by javascript). There is no ajax involved.

    I wonder if this could be a bug? In Selenium 1.0 there has never been such
    a problem.

    Thanks in advance!
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/pqQs0aXhy_oJ.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mike Riley at Aug 22, 2012 at 7:23 pm
    The document is correct, but a page being loaded and an element being
    present are two different things on most web pages. A lot of elements are
    created by JavaScript, ASP, PHP, etc. and the blocking the document refers
    to is merely the loading of the HTML.

    Setting an implicit wait will let it wait until the element is available to
    interact with or until it times out.

    Mike
    On Tuesday, August 21, 2012 2:45:42 AM UTC-7, Kent Tong wrote:

    Thanks! Now the document does reflect this, even though the API doc says
    otherwise (
    http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html):

    ...Load a new web page in the current browser window. This is done using
    an HTTP GET operation, and the method will block until the load is
    complete.

    so, the API doc is incorrect?
    On Monday, August 20, 2012 1:29:48 PM UTC+8, Kent Tong wrote:

    Hi,

    I am using the Selenium 2.0 WebDriver interface. Sometimes after calling
    click() on a link element, I have to use waitForElement to access the
    resulting page; if I use getElement, it will fail to find the element from
    time to time. This suggests that WebDriver isn't really waiting for the
    page to load before returning. I am using the Firefox variant of the
    driver. The link is just a simple link (no javascript) and the resulting
    page is a very simple page (elements generated on the server side and none
    by javascript). There is no ajax involved.

    I wonder if this could be a bug? In Selenium 1.0 there has never been
    such a problem.

    Thanks in advance!
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1mlEcjH0iXgJ.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedAug 20, '12 at 8:23a
activeAug 22, '12 at 7:23p
posts4
users2
websiteseleniumhq.org

2 users in discussion

Mike Riley: 2 posts Kent Tong: 2 posts

People

Translate

site design / logo © 2022 Grokbase