Tag: selenium

Docker Selenium – testing通过Chrome,但不是Firefox

我有一个有两个Selenium服务的Docker Compose文件: selenium-chrome: container_name: selenium-chrome image: selenium/standalone-chrome ports: – "4444:4444" networks: – teamcity-network selenium-firefox: container_name: selenium-firefox image: selenium/standalone-firefox ports: – "4448:4448" networks: – teamcity-network 我有安装了量angular器的另一项服务。 这是我的量angular器configuration文件: exports.config = { onPrepare: function () { var jasmineReporters = require('jasmine-reporters'); jasmine.getEnv().addReporter(new jasmineReporters.TeamCityReporter()); }, framework: 'jasmine2', specs: [ '/project/tests/**/*-spec.js' ], capabilities: {}, multiCapabilities: [ { 'browserName': 'chrome', 'shardTestFiles': true, […]

如何在docker-compose中将公共端口分配给端口5900

我有下面的YAML文件: seleniumhub: image: selenium/hub ports: – 4444:4444 firefoxnode: image: selenium/node-firefox-debug ports: – 4577 links: – seleniumhub:hub expose: – "5900" chromenode: image : selenium/node-chrome-debug ports: – 4578 links: – seleniumhub:hub expose: – "5900" docker工人ps: time="2017-04-01T17:57:44+03:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows" CONTAINER ID IMAGE COMMAND CREATED […]

Selenium ChromeDriver无法加载资源:net :: ERR_CONNECTION_CLOSED

我使用Codeception使用WebDriver和Docker Selenium独立服务器运行一些验收testing。 我注意到,我的一个testing后,抛出一个错误,我得到这个logging: [Selenium browser Logs] 13:59:52.345 SEVERE – https://ssl.google-analytics.com/ga.js – Failed to load resource: net::ERR_CONNECTION_CLOSED 有趣的是,在网页上没有任何谷歌分析(或应用程序)。 我猜测,有一些匿名的使用情况分析,但不知道它是谁,是Selenium , Codeception还是包含libs,甚至是Selenium的ChromeDriver。 我用–net=host运行Selenium服务器,也许这–net=host有点关系。 任何人都知道如何closures这些分析,或让Codeception忽略失败的外部资源?

Docker容器无法到达本地主机端口4444.为什么?

我容纳了一个应用程序,它是自动Seleniumtesting的testing驱动程序。 Selenium服务器(也称为Selenium Hub)在localhost:4444下的另一个Container以及Firefox节点上运行。 但我的应用程序无法达到它: Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: '10d3b5fd1010', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '3.16.0-4-amd64', java.version: '1.8.0_11 1' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:158) at de.services.impl.TestSetupFactory.getWebDriver(TestSetupFactory.java:408) at de.services.impl.TestSetupFactory.getSeleniumService(TestSetupFactory.java:279) at de.services.impl.AutomationServiceImpl.executeTests(AutomationServiceImpl.java:220) at de.start.Start.main(Start.java:25) Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:4444 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] […]

获取错误铬不可从docker到达

我正试图从一个python应用程序的铬上运行seleniumtesting。 这工作正常,如果我在独立的python服务器上运行。 当我创buildDocker镜像并尝试从那里执行时,我得到一个这样的错误 2017-10-03 21:18:49 – DEBUG :: Thread-1 : Error occured: Message: chrome not reachable (Driver info: chromedriver=2.32.498513 (2c63aa53b2c658de596ed550eb5267ec5967b351),platform=Linux 4.4.84-boot2docker x86_64) 。 我看到了几个关于SO的答案,这些答案build议将–no-sandbox and –disable-setuid-sandbox参数添加到chrome选项,但是当我尝试运行映像时仍然遇到该错误。 options = webdriver.ChromeOptions() options.binary_location = '/app/webdrivers/linux/32/chromedriver' #options.add_argument('headless') options.add_argument('–no-sandbox') options.add_argument("–disable-setuid-sandbox") #options.add_argument('window-size=1200×600') driver = webdriver.Chrome(chrome_options=options) 我已经安装了铬驱动程序,它的存在于我的泊坞窗应用程序文件夹中,并且我已经复制到/usr/bin和/usr/local/bin只是为了看看是否能解决我的问题。 任何帮助,高度赞赏。 谢谢 !!

Docker的图像是“selenium / standalone-firefox:3.4.0-chromium”,它包含Firefox和Chrome驱动程序吗?

是Docker镜像selenium/standalone-firefox:3.4.0-chromium旨在同时包含Firefox和Chrome驱动程序? 现在我有这个Dockerfile来build立一个selenium服务器: FROM selenium/standalone-firefox:3.4.0-chromium USER root ENV NODE_ENV test RUN mkdir -p /usr/local/cdt-tests/csv-data COPY ./csv-data /usr/local/cdt-tests/csv-data USER seluser 它适用于Firefox,但我得到这个Chrome相关的错误: [20:14:36] I/testLogger – [chrome #11] PID: 15 [chrome #11] Specs: /usr/local/cdt-tests/test/e2e/by-roles/itso/home-page/home-page-spec.js [chrome #11] [chrome #11] (node:15) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [chrome #11] selenium host: cdt-selenium.cdt-net [chrome #11] cdt server host: cdt-server.cdt-net [chrome […]

Docker镜像与python3,chromedriver,铬和selenium

我的目标是用docker集装箱的python驱动的selenium刮网。 我环顾四周,并没有find一个docker的形象与所有以下安装: python3 chromedriver 铬 selenium 任何人都可以链接到一个docker的形象与所有这些安装和一起工作? 也许build立我自己的想法并不像我想象的那么困难,但至今为止我提到了这一点。 任何和所有build议表示赞赏。

创build包含Selenium的Firefox和Chrome驱动程序的Dockerfile

我有以下Dockerfile将build立一个Selenium服务器 FROM selenium/standalone-firefox:3.4.0-chromium FROM selenium/standalone-chrome USER root ENV NODE_ENV test RUN mkdir -p /usr/local/cdt-tests/csv-data COPY ./csv-data /usr/local/cdt-tests/csv-data USER seluser 显然这两个FROM语句不正确 =>我如何创build一个Selenium服务器容器同时具有Chrome驱动程序和Firefox驱动程序。 据我所知, selenium/standalone-firefox:3.4.0-chromium图像只适用于Firefox。

内存和docker集装箱上的cpupipe理

我正在Docker容器上运行selenium网格。 我有一个运行selenium集线器的容器和五个运行chrome-nodes的容器(每个容器最多有5个会话)。 问题是,testing团队请求chrome会话的随机数。 一般情况下,当有大约5个chrome会话请求时,内存使用率上升到80%,CPU上升到95%。 还有一个请求和所有的容器,使selenium不可用于每个人。 我的问题是如何防止这种情况发生? 由于我无法控制testing团队将要请求的会话数量,因此我想限制Docker容器可用的RAM和CPU的百分比。 我必须在每个容器上执行此操作,还是只执行一次Docker应用程序的操作?

托pipe虚拟机添加到PATH

在Google App Engine的Managed VMS的Python运行时 ,我想安装Splinter (selenium)Chromedriver。 根据Linux的文档,我有我的dockerfile中的以下内容: # Dockerfile extending the generic Python image with application files for a # single application. FROM gcr.io/google_appengine/python-compat RUN apt-get update && apt-get install -y apt-utils zip unzip wget ADD requirements.txt /app/ RUN pip install -r requirements.txt RUN cd $HOME/ RUN wget https://chromedriver.googlecode.com/files/chromedriver_linux64_20.0.1133.0.zip RUN unzip chromedriver_linux64_20.0.1133.0.zip RUN mkdir -p […]