Tag: 谷铬铬

selenium镀铬在jenkins奴隶崩溃

我试图在无头模式下使用selenium运行UItesting。 我看到铬是浏览器崩溃,每当我尝试加载驱动程序。 这是追溯。 Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/behave/model.py", line 1456, in run match.run(runner.context) File "/usr/local/lib/python3.5/dist-packages/behave/model.py", line 1903, in run self.func(context, *args, **kwargs) File "steps/collectorUi.py", line 35, in step_impl assert context.ndpUt.driverInit(title="Pegasus Portal") is not False, 'Initial page title didnt match' File "../collectorSanity/libs/ndpUi.py", line 91, in driverInit browser=self.browser) File "../runner/testutils/seleniumutils.py", line 70, in __init__ executable_path=self.browserPath+self.browserDriver) […]

获取错误铬不可从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 […]