Tag: seleniumselenium

如何将selenium html-runner与docker结合使用?

我试图设置一个使用selenium-html-runner的docker镜像来运行从Selenium IDE生成的html文件来自动testing它们。 不过,我在Docker容器中运行Firefox浏览器的GUI非常困难。 我发现了下面的文章( https://medium.com/@yiquanzhou/run-selenium-ui-tests-in-docker-container-78be98e1b52d ),但是在运行命令时不工作: Xvfb :99 -ac & 我打算设置所有必要的configuration,以便我可以运行以下命令: java -Dwebdriver.gecko.driver="/path/to/geckodriver" -jar "path/to/selenium-html-runner.jar" -htmlSuite "*firefox" "https://www.target-website.com" "test_suites/" "results/" 有没有人有以前的经验,在容器内运行selenium-html-runner? 先谢谢你!

启动已启动并停止的容器

我开始使用一个容器 docker run -d –link hub:hub –name chromeNode selenium/node-chrome 现在,如果我运行相同的命令,我知道它会给我一个错误,如下所示 docker: Error response from daemon: Conflict. The name "/chromeNode" is already in use by container f05717d38a676946be74300768dd3d2cb9dd6733d88e1c1e46d85cef3de18c06. You have to remove (or rename) that container to be able to reuse that name.. See 'docker run –help'. 所以如果我必须启动相同的容器chromeNode docker start chromeNode会自动链接到hub因为我不使用 – –link参数? 或者我应该摧毁一个容器,每次都run一个新容器?

在虚拟机上发布虚拟机Selenium Grid

我正在虚拟机上运行selenium的docker网格。 使用组合文件来设置selenium网格 获取以下错误消息: Cleaning up stale test sessions on the unregistered node http://172.17.0.4:5555 Registered a node http://172.17.0.4:5555 Marking the node http://172.17.0.4:5555 as down: cannot reach the node for 2 tries 详细信息: VM:红帽企业Linux服务器版本7.2(Maipo) docker构成文件: hub: image: selenium/hub ports: – "4444:4444" firefoxnode: image: selenium/node-firefox-debug links: – hub expose: – "5555" 请帮我解决这个问题

seleniumtesting与docker或没有

假设我有一些用Selenium WebDriver编写的自动化testing。 据我所知,我可以使用dockerized Firefox浏览器甚至Selenium Grid。 但是我的问题是docker firefox比firefox更好的优点是什么? 在Docker中使用标准Selenium Grid而不使用Docker时,Selenium Grid会出现同样的问题。 谁能告诉我为什么一个比另一个好? 或者在哪些情况下最好在Seleniumtesting中使用docker?

SeleniumHQ泊坞窗图像创buildseleniumselenium网格的seleniumpythontesting

简单来说 如何从SeleniumHQ docker镜像创build的Selenium Grid容器中正确运行Python Seleniumtesting? PS我也问SeleniumHQ在这里https://github.com/SeleniumHQ/docker-selenium/issues/521 错误&日志 00 – 控制台错误 01 – 集线器日志 02c – 铬节点日志 02f – Firefox的节点日志 全部细节 我试过谷歌search和我们网站上的类似search ,发现没有用; 所以问题在这里问。 好,独立 我已经成功地针对Chrome和Firefox的独立selenium网格运行这个简单的testing – 启动网格视图独立网格创build脚本 docker run -d -p 4445:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.4.0-einsteinium docker run -d -p 4446:4444 –shm-size 2g selenium/standalone-firefox:3.4.0-einsteinium – 运行testing视图独立testing #!/usr/bin/env python2.7 SELENIUM_HUB_CH = 'http://localhost:4445/wd/hub' #hub created at file 's01b_start_selenium_standalone_grid.sh' […]

与Selenium集线器和Firefox的Behat错误:无法打开连接:从webdriver收到的有效负载是有效的,但意想不到的json

我正在尝试使用selenium/hub , selenium/node-chrome-debug和selenium/node-firefox-debug图像在Docker上运行Behat。 使用Chrome节点运行Behat正在工作,但Firefox节点给我以下错误: Could not open connection: Payload received from webdriver is valid but unexpected json: {"value":{"sessionId":"244f4715-c59b-4bfc-aa17-8f6a867ead83","capabilities":{"moz:profile":"/tmp/rust_mozprofile.u3mB4xKf6nVD","rotatable":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"pageLoadStrategy":"normal","moz:headless":false,"moz:accessibilityChecks":false,"acceptInsecureCerts":false,"browserVersion":"57.0","platformVersion":"4.9.60-linuxkit-aufs","moz:processID":1005,"browserName":"firefox","platformName":"linux","moz:webdriverClick":false}}} (Behat\Mink\Exception\DriverException) 当我vnc的Firefox节点,我看到它打开Firefox,但没有发生。 我docker-compose.yml : version: '3.2' services: site.local: image: webdevops/php-apache-dev:7.1 ports: – "8888:80" volumes: – ./public:/app – .:/application selenium-grid-hub.local: image: selenium/hub ports: – "4445:4444" selenium-node-chrome.local: image: selenium/node-chrome-debug environment: – HUB_PORT_4444_TCP_ADDR=selenium-grid-hub.local – HUB_PORT_4444_TCP_PORT=4444 ports: – "5901:5900" selenium-node-firefox.local: image: […]

官方Selenium Hub docker镜像的自定义返回“权限被拒绝”

我从这里复制官方selenium网格枢纽的dockerfile。 我想定制它的configuration文件,所以不是复制[复制]他们,我添加他们[添加]的url。 所以这: COPY generate_config /opt/selenium/generate_config COPY entry_point.sh /opt/bin/entry_point.sh 变成这样: ADD https://gist.githubusercontent.com/myaccount/d5203b3e/raw/d8dfcd9fd/generate_config /opt/selenium/generate_config ADD https://gist.githubusercontent.com/myaccount/gfsfe2fc/raw/fdefe4e06/entry_point.sh /opt/bin/entry_point.sh 我在Win10上使用Docker-Toolbox,在Kitematic里面我看到: 难道我做错了什么? 我错过了什么吗? 这与操作系统的差异有关吗? dockerfile的目的不是为了构build跨平台的图像吗? -EDIT-另外…与selenium网格node-firefox dockerfile相关的事情发生。 从Kitematic我得到这个:

在容器中运行selenium / capybaratesting时,Docker“无法打开TCP连接到127.0.0.1:4444”

我在一个ruby应用程序中有一些Selenium Webdriver / Capybara自动化设置。 与此同时在一个VirtualBox虚拟机使用Linux我有一个docker容器Selenium网格docker run -d -p 4444:4444 –name selenium-hub -e GRID_TIMEOUT=120000 selenium/hub:2.53.0和一个firefox节点docker run -d –link selenium-hub:hub selenium/node-firefox:2.53.0 。 在虚拟机上添加一个DNS条目到docker_opts之后,在我的主机上运行我的Seleniumtesting(在我的虚拟机上使用网格),一切正常。 在这之后,我将自动化代码设置在我的虚拟机上的一个ruby容器中,位于网格和容器的旁边。 容器build立得很好。 我也能够附加到它没有问题,所有我的代码是在那里按预期。 从我的自动化容器中的terminal,如果试图运行一个规范前。 rspec spec/some_spec.rb我会得到一个连接拒绝错误 “无法打开TCP连接到127.0.0.1:4444(Connection refused – connect(2)for \”127.0.0.1 \“port 4444)” 在这个问题上search了18个结果,我所看到的唯一可行的事情就是提到创build一个桥梁,我不太了解。 任何build议如何纠正这将不胜感激。

dockerseleniumselenium鼓集线器不能从不同的机器(在同一networking)访问

我已经build立了我的本地主机上的seleniumdocker集线器,它已经启动并运行(不过通过Kitematic它显示了两个IP地址为docker selenium-hub)(看到这个) 我已经检查了docker selenium-hub在我的本地机器上正常运行 主要问题开始出现,当我尝试从另一台机器注册铬节点 现在我想在另一台机器上运行selenium docker chrome节点,所以我在另一台机器上触发了以下命令(节点机器的IP地址是'192.168.80.135',我希望node-chrome docker在'5555'端口上运行)。 我为此发射的命令是 docker run -d -p 5555:5555 -e REMOTE_HOST="http://192.168.80.135:5555" -e HUB_PORT_4444_TCP_ADDR="192.168.99.101" -e HUB_PORT_4444_TCP_PORT="4444" — name chrome-node selenium/node-chrome-debug:2.53.1 不过,上面的命令显示了node-chrome-debug控制台中的这种错误 06:10:03.690 INFO – I/O exception (java.net.NoRouteToHostException) caught when processing request to {}->http://192.168.99.101:4444: No route to host 06:10:03.690 INFO – Retrying request to {}->http://192.168.99.101:4444 08:25:15.809 INFO – Retrying request to […]

如何使用selenium Docker在节点浏览器上设置function

我是与seleniumdocker新。 我想创build一个具有function的Chrome / Firefox节点(Selenium Grid)。 当我添加一个Selenium Node docker容器时如何添加function? 我发现这个命令到目前为止… docker run -d –link selenium-hub:hub selenium/node-firefox:2.53.0 但我不知道如何添加function。 已经使用这个命令,但不工作。 docker run -d –link selenium-hub:hub selenium/node-firefox:2.53.0 -browser browserName=firefox,version=3.6,maxInstances=5,platform=LINUX