-
Notifications
You must be signed in to change notification settings - Fork 575
cannot enable Flash by default. neither firefox or chrome #497
Comments
Hi @Shinoby1992, Could you please share the code you use to do that? I've never tried it before, but we can double check. |
Okay easy way here is a code. Now my second big question btw ... like in this situation i am now, i tried now 2 days to edit the dockerfile and create my custom zalenium build with
|
if you need more information let me know i still couldn't solve my issue , i even tried already existing docker images with pulse audio and browsers installed and tried to use the dockerfile as a template to add codes to zelenium dockerfile and custom build it but somehow this does not work... greetings from dortmund |
Hi @Shinoby1992, Sorry for the delay, Easter holidays :) Could you please share your modified dockerfile please? Greetings from Berlin! |
Sorry i had to reproduce everything, but still i cannot solve my problems
and then of course making a local snapshot with make I tried solving my problem with zalenium, with elgalu/selenium, SeleniumHQ/docker-selenium The second problem is that enable firefox flash for a website and allow it always somehow does not work. |
Hi @Shinoby1992, Sorry for not checking this before. Anyway, what I could see with the latest image of FROM elgalu/selenium
USER root
RUN echo "deb http://archive.canonical.com/ubuntu xenial partner\n" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y adobe-flashplugin
USER seluser After that, when I open Firefox, I can run pages with Flash. That is part one of the solution, to have an image that can have Chrome and Firefox running Flash. The second part is to send the correct capabilities/profile/preferences to Chrome and Firefox so the test can run on the page with Flash enabled. After Googling, I found these links: So I think it is a matter of trying them in the test and/or researching a bit more how to do it. Please give it a try. I will close this issue since it is more related on how to build the image with Flash added and also running a test with it, and it is not a Zalenium bug or something like that. If you need more assistance on running the test with Flash, perhaps you can join us at https://seleniumhq.herokuapp.com/, there is a specific channel for #zalenium and another one for general questions of Selenium and docker-selenium (this one is called #selenium). |
@diemol I think this issue is not solved yet. I passed the desired capability for chrome to zalenium remote webdriver like this
When I navigate to the https://www.whatismybrowser.com/detect/is-flash-installed, the chrome instance did say the flash is installed, However, when I truly navigate to a website that needs flash to load the content, it is asking me to enable the flash by restart the browser. |
Hi @DowneyTung, What I did when I replied to this issue was to perform manually the needed actions to enable flash, and then create an image based on those actions. That was already several Chrome versions ago, so probably the same does not work anymore. So the job is now to take the latest image and replay the actions and figure out again what needs to be done, because when we build the images we do not add flash to them, therefore this would need to be added in a new image based on the one we build. |
I used some old version elgalu/selenium (chrome version 64) and build a new docker file with flash plugin installed, but still get the
I also passed the
And here is how the test looks like when it launches, you can notice, https://www.whatismybrowser.com/detect/is-flash-installed showed flash is installed, and also the flash website also show it is downloading....but after that, it requires a restart of browser to enable flash player. |
@diemol I finally figured out the solution for this. Long story short, it might not be a good idea to use a customized profile user So I think the solution would be make the chromium use the right version of flash, which is So, if we don't pass the so if I build a new
The extra step above will install the Then I start the zalenium container as usual.. When I run my test, I just need add these options to the test, and the flash would work.
|
That's great @DowneyTung! Thanks for your effort and documenting it here. |
Please make sure that you provide enough information for us to help you with this issue. Thank you!
Zalenium Image Version(s):
latest
Docker Version:
latest
If using docker-compose, version:
latest
OS:
OSX High Sierra (latest macosx)
Docker Command to start Zalenium:
docker run --rm -ti --name zalenium -p 4444:4444 -e DOCKER=17.06.2-ce -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --videoRecordingEnabled false --desiredContainers 0 --timeZone "Europe/Berlin" --screenWidth 1280 --screenHeight 673
Expected Behavior -
chrome/firefox enabled flash
Actual Behavior -
in firefox activate flash message
in chrome activate flash message and "restart chrome to enable flash" in the left corner
I cannot enable flash in chrome or in firefox
my python code does connect with webdriver.remote
i tried everything out i cannot solve this issue not with firefox, or with chrome
running my python code locally just with webdriver.Firefox or webdriver.Chrome does work:
i use this one locally and is enough for firefox having flash enabled
#profile = webdriver.FirefoxProfile()
#profile.set_preference('plugin.state.flash', 2)
The text was updated successfully, but these errors were encountered: