Flakiness with Firefox 8, 9beta (Possibly related to Selenium Issue# 2927 or mouse/cursor position) #11

emanlove opened this Issue Dec 1, 2011 · 1 comment

1 participant


I have some once working tests that started to become very flaky and inconsistent, failing in different ways when repeated run. I have been making several changes including changes to robotframework_selenium2library/setup.py, removing static decorator and selenium libraries preferring to let buildout grab both the latest and pinned versions, adding selenium 2 implicitly_wait functionality, upgrading Firefox on Ubuntu 11.04 from the Ubuntu 11.04 bundled 4.0 up to Mozilla Team 9.0.beta back down to Mozilla Team 8.0. So any number of things could have caused my flakiness.

Searching I came across Selenium Issue# 2927 which has some similar characteristics. I was expriencing inconsistant results from run to run but no issues with sockets. I removed the Firefox profile, as shown here in this diff

diff --git a/src/Selenium2Library/keywords/_browsermanagement.py b/src/Selenium2
index 6101fe4..774eef4 100644
--- a/src/Selenium2Library/keywords/_browsermanagement.py
+++ b/src/Selenium2Library/keywords/_browsermanagement.py
@@ -7,8 +7,8 @@ from Selenium2Library.utils import BrowserCache
 from Selenium2Library.locators import WindowManager
 from keywordgroup import KeywordGroup

-ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
-FIREFOX_PROFILE_DIR = os.path.join(ROOT_DIR, 'resources', 'firefoxprofile')
+#ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
+#FIREFOX_PROFILE_DIR = os.path.join(ROOT_DIR, 'resources', 'firefoxprofile')
 BROWSER_NAMES = {'ff': '*firefox',
                  'firefox': '*firefox',
                  'ie': '*iexplore',
@@ -353,7 +353,8 @@ class _BrowserManagementKeywords(KeywordGroup):
         browser_token = self._get_browser_token(browser_name)
         browser = None
         if browser_token == '*firefox':
-            browser = webdriver.Firefox(webdriver.FirefoxProfile(FIREFOX_PROFIL
+            #browser = webdriver.Firefox(webdriver.FirefoxProfile(FIREFOX_PROFI
+            browser = webdriver.Firefox()
         elif browser_token == '*googlechrome':
             browser = webdriver.Chrome()
         elif browser_token == '*iexplore':

and experienced some improvement. But I noticed still some flakiness and by accident I also noticed my mouse over elements that seemed to be unable to locate. If I move my mouse away from the test browser running the tests are much more consistent.

So I am not sure of the root cause of the issue whether mouse position over test browser or Firefox profile or some issue altogether different but I wanted to record what I am seeing in case others are experiencing similar issues.

Ubuntu 11.04
Firefox 8.0, 9.0beta
Selenium 2.13.1, 2.14.0
robotframework-selenium2library 0.5.3 with modifications
robotframework 2.6.2


I have not seen this issue in a while. As I was the one reporting I am going to close it.

@emanlove emanlove closed this May 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment