Integration tests - selenium - StaleElementReferenceException

Bug #1353342 reported by Tomáš Nováčik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Vlad Okhrimenko

Bug Description

It is a common problem to deal with ajax updates (loading of web elements) when using selenium. When selenium have some element already cached and this element is changed via some update, it results in raising StaleElementReferenceException.

More information can be found in here: http://docs.seleniumhq.org/exceptions/stale_element_reference.jsp.
Possible solutionst: http://stackoverflow.com/questions/4846454/selenium-webdriver-staleelementreferenceexception

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/112586

Changed in horizon:
assignee: nobody → Tomáš Nováčik (tnovacik)
status: New → In Progress
Changed in horizon:
assignee: Tomáš Nováčik (tnovacik) → Vlad Okhrimenko (vokhrimenko)
Revision history for this message
Vlad Okhrimenko (vokhrimenko) wrote :

Sorry, it was by mistake(when I rebased yours patch to master). I wanted upload my patch without conflicts with master-branch of Horizon

Changed in horizon:
assignee: Vlad Okhrimenko (vokhrimenko) → Tomáš Nováčik (tnovacik)
Changed in horizon:
assignee: Tomáš Nováčik (tnovacik) → Vlad Okhrimenko (vokhrimenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/112586
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4495e8cafe9b94c1e8a314736e9dab128f147fb8
Submitter: Jenkins
Branch: master

commit 4495e8cafe9b94c1e8a314736e9dab128f147fb8
Author: Tomas Novacik <email address hidden>
Date: Thu Aug 7 16:02:02 2014 +0200

    Add workaround for StaleElementReferenceException

    StaleElementReferenceException occurres when accessing web element that
    was reloaded but looks the same. It happens for example when trying to access
    form under Project/Data processing/image registry -> register image. It
    is ussually caused by javascript that is loading the page or by mistake
    in script logic.

    This patch wraps the WebDriver and WebElement classes and catches the
    occurrence of StaleElementReferenceException and tries to find the web
    element again. Till maximum limit is reached or top element is reached
    as this suggest that mistake was made by programmer.

    Closes-Bug: #1353342

    Partially implements blueprint: selenium-integration-testing

    Change-Id: I8e24e952e0fb81bed21b7139870d6d7506509c93

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → kilo-1
tags: added: integration-tests
Changed in horizon:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.