Tag: 谷歌铬

Pupeeteer在一个容器中无头的Chrome

我试图找出如何在Docker容器中运行无头的Chrome。 然后我find了这个 。 但现在我不知道如何在该容器中运行我的testing。 有人能给我一个大致的方向,我应该在哪里挖掘,我尝试翻看Pupeeteer的文档,但找不到任何东西。 也许在野外有一个很小的例子,我可以使用Karma或其他方法在容器中运行testing并logging结果。 请注意,虽然我想在容器外编译/捆绑javascript,并且只是为了在其中执行编译/捆绑testing。 也许以后我想用相同的方法来运行我的验收testing,但这次通过运行一个外部的web服务器,可能在一个单独的容器。 我的最终目标是能够运行一些用Clojurescript编写的testing,我不认为有人做过类似的事情。 也许有人有。

Kubernetes特权容器和function

我有一个具有一些SYS_ADMINfunction的容器,并且遇到了阻塞吊舱的问题,并且想知道处理这些不情愿的容器的最佳方法是什么? – image: headless-chrome securityContext: capabilities: add: – SYS_ADMIN

Docker容器请求OSX上的chrome失败

我有几个使用Docker for Mac在Docker上运行的Docker容器,我已经在docker-compose文件中设置了端口映射,以便在localhost上访问它们。 这通常有效,但有时从Chrome浏览器访问它们时,请求会失败。 在这个事件中,我在docker-compose输出中看不到任何东西,暗示容器已经收到一个请求,并且这个标签只要挂了很长时间就离开它。 唯一有用的是等待片刻,然后在另一个Chrome选项卡中打开另一个url(甚至是相同的本地主机url),这有时会导致请求到本地主机通过。 我对其他浏览器(Firefox,Safari)没有任何问题,使用Ubuntu上的Chrome可以可靠地访问相同的容器。 版本: OSX:10.12.4 Docker:17.03.1-ce-mac12 Chrome:58.0.3029.110

Docker / Selenium /无头Chrome:正确configurationSUID沙箱

我想运行我的docker集装箱中的selenium和无头铬进行testing。 我试图在我的.js文件中使用以下代码在无头镀铬区域(在Docker容器外)运行selenium。 这工作: const client = webdriverio.remote({ desiredCapabilities: { browserName: 'chrome', chromeOptions: { args: ['–headless', '–disable-gpu'] }, binary: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' }, baseUrl: CONFIG.host, logLevel: 'verbose', waitForTimeout: 3000 }) 但是我不能在我的docker集装箱里工作。 在我的docker集装箱,我使用“从selenium/独立铬”。 我的dockerfile似乎没有任何问题。 当我尝试运行我的seleniumtesting时出现问题。 我将.js文件中的binary_path更改为/ opt / google / chrome / google-chrome。 但是testing失败,客户端甚至无法启动。 所以我试着运行/ opt / google / chrome / google-chrome来查看chrome是否有效,但是我得到这个错误: [0711/005304.226472:ERROR:nacl_helper_linux.cc(311)] NaCl helper process running […]

在docker中如何用铬来运行selenium

我在Docker中安装了google-chrome,但是当我运行我的python脚本selenium时,它失败了,如下所示: automation@1c17781fef0c:/topology-editor/test$ python test.py Traceback (most recent call last): File "test.py", line 27, in <module> browser = webdriver.Chrome() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__ self.start_session(desired_capabilities, browser_profile) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 185, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute self.error_handler.check_response(response) File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in […]

Windows和Linux上的Chrome和Firefox(selenium)

我只用Windows机器运行Selenium网格,资源使用率很高。 我一直在考虑将Chrome和Firefox放在Docker容器中以提高效率。 我的问题是,在不同的平台上浏览器本身有什么关键的区别,也就是说,Windows上的Chrome与Linux上的Chrome不同,还是运行相同的代码,并且行为相同?

如何在docker中运行google chrome headless?

我的问题是如何在Docker容器中运行谷歌浏览器进行e2etesting。 我从官方的Jenkins图像创buildDockerfile ,但是当试图运行谷歌浏览器时,它崩溃并显示错误: Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted Trace/breakpoint trap (core dumped) Jenkinsdocker工人使用Debian jessie 。 我可以用–headless标志运行谷歌–headless ,而不需要X服务器。 这是我的docker文件: https://github.com/ripper2hl/jenkinswithchrome jenkins官方形象: https://github.com/jenkinsci/docker 回购一个人用Docker运行谷歌浏览器的GUI: https://github.com/jessfraz/dockerfiles/blob/master/chrome/stable/Dockerfile 我的第一个方法是使用xvbf ,但是使用 – 无–headless标志的过程更简单。 https://gist.github.com/addyosmani/5336747 我可以在Ubuntu服务器上运行chrome来安装相同的命令,但在docker中失败。 在其他意图之后,我使用了–no-sandbox标志,但是docker图像显示了下一个错误。 [0427/180929.595479:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected [0427/180929.595537:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager […]

Docker和Chromium net :: ERR_NETWORK_CHANGED

我有一个AngularJS应用程序执行ajax调用,但它导致铬错误: net::ERR_NETWORK_CHANGED 我试图禁用任何我不需要的适配器。 我有多个和多个docker集装箱运行。 我禁用了每个适配器上的ipv6。 我不使用任何代理,并使用默认的Chromium浏览器,没有任何插件或浏览器configuration文件。 禁用Wifi接口,只能使用以太网。 任何想法如何解决这个问题?

Docker中使用Xvfb的无头Chrome

我正在尝试使用Xvfb在Docker容器中运行Chrome headless 。 但是,虽然ps显示Chrome进程存在,但它没有到达我的testing网站。 在Docker外部运行相同的命令是成功的。 Xvfb :0 -screen 0 1024x768x24 & DISPLAY=:0 google-chrome http://mytestpage.com 在Docker中 ,我收到以下消息/错误: Xlib: extension "RANDR" missing on display ":0". Xlib: extension "RANDR" missing on display ":0". [1180:1180:1120/051319:ERROR:desktop_window_tree_host_x11.cc(882)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType) [1223:1223:1120/051319:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process [1180:1201:1120/051319:ERROR:browser_gpu_channel_host_factory.cc(144)] Failed to create channel. 而 ps au […]