Home > selenium2 > Firefox (3.6) not loading Flash when running Selenium2 tests

Firefox (3.6) not loading Flash when running Selenium2 tests

May 6Hits:1
Advertisement

I've seen several mentions of an issue when running tests in Firefox: the Flash player doesn't load the SWF if the browser window doesn't have focus. This causes sporadic test failures if the system used for running tests is doing anything else. I've verified that if the Firefox browser is behind IE the test will hang until it times out or else I bring Firefox to the foreground manually.

A workaround that allows the Selenium2/WebDriver test to bring the browser to the front or to override this behavior of the player would be much appreciated.

Answers

I've copy/pasted this answer from the webdriver groups.

Hi, The focus thing is a real problem for Firefox (in particular) and becomes even harder when tests are run in parallel for obvious reasons.

We have avoided stealing focus for a window because people tend to run a suite of webdriver tests and then get on with something else whilst they're running. The best bet would be to call "window.focus" using the JavascriptExecutor service immediately before calling the flex app. If this doesn't work, you might consider using a tool to handle the window focusing in addition to webdriver: Windows exposes a few methods that might be useful and which could be accessed by JNA[1] for example.

Is this something that other people have been struggling with too?

Regards, Simon

Another thing you could do is to use a tool like desktops to make sure your browsers are opened on their own desktop. If you use selenium RC just start RC from the desktop you want your browser to open on.

Related Articles

  • Firefox (3.6) not loading Flash when running Selenium2 testsMay 6

    I've seen several mentions of an issue when running tests in Firefox: the Flash player doesn't load the SWF if the browser window doesn't have focus. This causes sporadic test failures if the system used for running tests is doing anything else. I've

  • Installing Flash while running Ubuntu from a USB Drive?August 14

    I am running Ubuntu from a USB drive (Hard drive is messed up and cannot install waiting on replacement parts etc) and I need to have Adobe Flash Installed yet I cannot figure out how to do it. When I tried to install via Ubuntu Software Centere I ge

  • How to make Chrome stop loading Flash on selected websites?July 11

    I have an old laptop with low memory. I use Chrome in Ubuntu 11.04. When I go to a website that has many flash files (ads), my laptop starts hanging and I can't do anything. Therefore, I want to disable loading Flash files in selected websites. How c

  • Firefox profile cannot be loaded after upgradeJune 1

    I upgraded from 11.10 to 12.04, now when I try to run Firefox from the icon it pops up this: "Missing Profile. Your Firefox profile cannot be loaded. It may be missed or inaccessible." I already tried to remove Firefox and re-installing it. And

  • Why does Firefox ask me to allow Flash twice?

    Why does Firefox ask me to allow Flash twice?August 5

    After one of the recent updates, Firefox is prompting me twice to allow Flash to run in any website which has Flash. I will show an example from Google Voice, but this happens on practically every website with Flash. I first get this prompt: If I all

  • Why does firefox ask me to upgrade Flash?September 15

    Why does Firefox ask me to upgrade flash occasionally when there appears to be no difference between the versions (10.1 r86 to 10.1 r86)? Also why do I have to always re-download the Adobe download manager? --------------Solutions------------- What d

  • Load Balancing long running TCP connectionsSeptember 24

    I'm trying to research the best way to load balance long running TCP connections for the following scenario: We have multiple servers behind a redundant set of firewalls and clients establish long running (usually 10-15 hours) TCP connections to our

  • How do you tell the version of Flash Player running in Chrome?December 9

    I am getting an error trying to debug in Flex: it says to make sure I'm running the debugger version of Flash Player. I downloaded it and installed it, but still am getting the error. But I wonder how in Chrome do I check which version of Flash is ru

  • How do I get flash to run in a separate instance for each tab (Chrome)?November 29

    I remember this used to be possible. You could have Flash run in a separate sandboxed instance for each tab. I have looked across the great interweb and cannot figure out how to do this though? It was usefull because it caused flash running on one pa

  • Chrome and Firefox not loading Flash Plugin (Couldn't load plug-in) February 2

    All of a sudden there's this message of 'couldn't load plug-in' on chrome. Firefox is fine though, I tried updating flashplayer but it didn't work. Thoughts? --------------Solutions------------- I solved the issue by moving the following folder to a

  • Firefox terminates if multiple instances of flash player runningFebruary 17

    If i have, say, youtube tab opened and if a click on some of the related videos (while it's still playing) firefox terminates. The same if I open youtube on one tab and myspace on another - firefox just shuts down. I want to know why this happens, is

  • Prevent screensaver when flash is running in linuxApril 6

    I imagine that my problem is not unique to my circumstances, and I have been having it for some time. I am running Arch Linux, and quite frequently watch videos, particularly flash, in fullscreen. However, eventually, the screensaver appears, and sta

  • Can a virus on a flash drive run itself without autorun?February 23

    Someone told me that it's possible for a virus to run itself from Flash memories even if autorun.inf is not present or this feature is disabled using gpedit.msc. He said a virus can run itself as soon as I plug in a flash memory. Is it correct? -----

  • Installing GRUB boot Loader freezes when Running "grub-install dummy"

    Installing GRUB boot Loader freezes when Running "grub-install dummy"May 21

    When installing Ubuntu 12.04 server from a disc, my system freezes up after the installation comes to Installing GRUB boot loader, with a 50% completion bar and the command "Running "grub-install dummy"... below that. I've tried this instal

  • Why can't Google Chrome load Flash plug-in?February 15

    I can't get any Flash content to load on Chrome. When I try to watch a YouTube video or something like that, it just says, "Couldn't load plug-in". --------------Solutions------------- You need to update Chrome to version 24.0.1312.69 or later.

  • Firefox 26 unable to load some websites?January 24

    When using the new version of firefox(26), some websites can not load like in the last version I was using (23). This specific problem happens only in my Ubuntu box. I have a Windows box with the same firefox version, and everything is just fine. The

  • Stop Firefox YouTube from auto-loading videos (HTML5)

    Stop Firefox YouTube from auto-loading videos (HTML5) March 22

    This question already has an answer here: Is there any way to disable a YouTube video from automatically starting in Firefox? 5 answers I am using Firefox version 36.0.4 which has HTML 5 video. How can I stop it from autoloading videos in YouTube. Fo

  • firefox fails to pass ntlm to apache2 running authenntlm on Centos 5.1October 22

    We are trying to get an application server that is running apache2 on centos 5.1 to use NTLM to provide SSO to a number of applications. We can get SSO to work with IE, however SSO fails with firefox. We have updated the NTLM trust entry in about:con

  • Urxvt flashes when running over SSH on XmingFebruary 1

    I have a windows 7 computer running Xming 6.9.0.31. I connect to my linux box running Ubuntu Server 9.10 with plink and run urxvt. It starts up and works perfectly however the urxvt screen flashes the xming root window about twice a second. This make

  • Application (was Firefox) crash on first load on Ubuntu Linux on older Dell LaptopMay 22

    I've had a Dell Latitude laptop since about 2000 without managing to destroy it. A month ago the Windows 2000 system on it did something stupid to its file system and Windows was completely lost. No point in reinstalling Windows 2000, so I installed

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 1.242 s.