I am running robot inside a custom docker image using 3.7-slim-buster
I use a setup using selenium/hub:4.1.2-20220217 and selenium/node-docker:4.1.2-20220217 provided by this project.
Basically at the end robot is sending a POST command to the selenium grid including the desiredCapabilities information.
I recently migrated the docker image to use 3.7-slim-bullseye. Robot and selenium python libraries were not changed but now the POST request is missing the desiredCapabilities information which induce problems.
I am wondering if someone already stumbled into this issue and if it is the case how you solved it?
Sincerely
Related
I've developed a framework which runs selenium tests with no problem on my local computer.
I also have developed a pipeline on Bamboo to execute those tests. It does, problem is I have no chrome browser installed on bamboo and I get the error saying "There is no chrome binary" obviously. There is no chance to install anything on bamboo, so I need to run these tests with no browser (also headless).
I've checked this: https://github.com/browserless/chrome
Sounds good to what I want to achieve but I don't know how to do it.
Do I need to run docker by command and then point my driver to the port or what?
Can anyone shed some light? I pretty lost and there are not much examples (or I don't know how to find them)
Thanks!!
My Python project is very windows-centric, we want the benefits of containers but we can't give up Windows just yet.
I'd like to be able to use the Dockerized remote python interpreter feature that comes with IntelliJ. This works flawlessly with Python running on a standard Linux container, but appears to work not at all for Python running on a Windows container.
I've built a new image based on a standard Microsoft Server core image. I've installed Miniconda, bootstrapped a Python environment and verified that I can start an interactive Python session from the command prompt.
Whenever I try to set this up I get an error message: "Can't retrieve image ID from build stream". This occurs at the moment when IntelliJ would have normally detected the python interpreter and it's installed libraries.
I also tried giving the full path for the interpreter: c:\miniconda\envs\htp\python.exe
I've never seen any mention that this works in the documentation, but nor have I seen any mention that it does not work. I totally accept that Windows Containers are an oddity, so it's entirely possible that IntelliJ's remote-Python feature was never tested on Python running in Windows containers.
So, has anybody got this feature working with Python running on a Windows container yet? Is there any reason to believe that it does or does not work?
Regrettably, it is not supported yet. Please vote for the feature request https://youtrack.jetbrains.com/issue/PY-45222 in order to increase its priority.
Hi I am really new to robot framework and docker so please bear with me.
I have test cases written in robot framework using PyCharm which are executing fine.
I also have grid up and running which contains one firefox and one chrome browser.
I want to run my testcases in parallel on that grid. Every test case on a separate browser side by side. I need help on what changes to make in my project and how to execute them on docker.
Tests run on Grid browsers if we pass the following params to Open Browser keyword:
Open Browser ${URL} ${Browser} ${NONE} http://localhost:4444/wd/hub
I'd suggest trying Selenoid, I use it for paralleled cross-browser run on Docker: https://aerokube.com/selenoid/
I have an idea setup CI with Robot Framework, you can get some information to build it:
https://github.com/dylanops/docker-robot-framework
I am passing the 90019 scanner, for SOAP injection, into a zap script, but it is not running it, while it does run other rules, such as OS Command Injection, and SSI Server Side. I am running zap from a docker container and I noticed watching the output that these other rules correspond to a particular zap plugin. So, I am guessing I am missing a SOAP plugin in my environment and my question is: how can I install a plugin in Docker that corresponds to scanner 90019 to make sure that the script that runs zap scan checks for this rule? Many thanks. If there's something else that I am missing or more info is needed, please let me know.
The SOAP Scanner is included in this add-on: https://github.com/zaproxy/zap-extensions/wiki/HelpAddonsSoapSoap
This is included in the weekly docker image but not in the stable one.
You can install it when you start ZAP in the docker container by adding the parameters:
-addoninstall soap
You can also install add-ons using the ZAP API, but thats only worth doing if you are already using the API.
TL;DR: Any idea about how to properly configure capybara to be able to drive a remote selenium browser in a docker container with default Rails minitest system test?
I'm running Rails in a dockerized env..
Now I want to start some "system tests" but since I'm running inside Docker I come up with some issues.
I'm using the default test suite (minitest?) with capybara and selenium-webdriver gems.
I've already installed the chromedriver packet in the container using the following:
RUN apt-get install -y chromedriver \
&& ln -s /usr/lib/chromium-browser/chromedriver /usr/local/bin
But running rails test:system outputs the following error Selenium::WebDriver::Error::WebDriverError: Unable to find chromedriver.
In fact I don't know if chrome itself is installed or not?
which chrome outputs nothing.
which chromium outputs /usr/bin/chromium.
I also tried with xvfb without success.
So (since I had no clue) I tried to go further and actually go with a dockerized system test environment as well.
I found some Docker images from selenium. So I ran among my rails and database containers a selenium-standalone-chrome container (the actual docker-compose.yml I'm using is here)
Then I found some useful information about the configuration to be done to let capybara driver the remote selenium browser.
All the examples I found on internet use rspec, but since I'm using the default minispec I tried to adapt the capybara driver to minispec but I had some doubt about how to do it and where to put the configuration.
For system tests I guessed that the best location is the file application_system_test_case.rb. Also I found and I tried many different capybara configurations and I end up with the following which seems to be the most complete (available here)
At that moment the test seems to perform well since I have no error but it always fails.
It fails regardless of making a call to the driver configuration (the setup_remote method where I defined the server host and port) before the tests case.
With or without the call I got the "site can't be reached" error (here is the screenshot)
Here is the test file I used. (Testing some react dynamic display)
However I can access to the selenium container with the given URL from the browser from my host machine. And both containers sees each others. I did some ping from within the containers shell.
The following SO questions being helpful don't work for me:
Dockerized selenium browser cannot access Capybara test url
How can I run headless browser system tests in Rails 5.1?
Any idea about how to properly configure capybara to be able to drive a remote selenium browser in a docker container with default Rails minitest system test?
Thank you very much.
You have to override the host method so Capybara uses the container's IP address. Check out this post: https://medium.com/#pacuna/using-rails-5-1-system-tests-with-docker-a90c52ed0648