xvfb

XVFB and Selenium on EC2 - Unable to view Chrome UI on VNC Viewer

浪子不回头ぞ 提交于 2020-08-26 05:34:18
问题 My Selenium headless tests are triggered from Jenkins server and run in EC2-Ubuntu. I want to view the test live on Chrome so I installed Xvfb plugin on Jenkins. On EC2 I installed Xvfb. When I start executing the build, my test starts execution and I see below logs: Xvfb /usr/bin/Xvfb :1 -fbdir /var/lib/jenkins/xvfb 27-..fbdir13700092919317283985 Parsing POMs Established TCP socket on 30810 and I see the test is running successfully. Now I do SSH to EC2 from Mac terminal by ssh -L 5901

Selenium python library via docker, Chrome error failed to start: exited abnormally

天大地大妈咪最大 提交于 2020-08-10 22:54:37
问题 I am trying to run some python scripts with the selenium library from within a docker container based on miniconda/anaconda, but I keep getting this error: selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally . I am also using a python wrapper for xvfb to avoid opening a real Chrome window. To reproduce this (from a running docker container): root@304ccd3bae83:/opt# python Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19

How to debug mesa driver problem with Xvfb, headless-gl when packaging for AWS Lambda

左心房为你撑大大i 提交于 2020-04-17 21:44:34
问题 I am stuck at debugging the packaging of a custom Xvfb built with headless-gl (ThreeJS and WebGL) for AWS Lambda. Potentially I am missing some intricacies of installing drivers or just a required library and I cannot get useful logs. I am trying to run node with ThreeJS/WebGL in a headless environment. The purpose of this is to package it all into an AWS Lambda function. Currently, I am testing in Docker with a clean lambci/lambda:build-nodejs12.x image (which should resemble amazon linux 2)

How to debug mesa driver problem with Xvfb, headless-gl when packaging for AWS Lambda

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-17 21:40:21
问题 I am stuck at debugging the packaging of a custom Xvfb built with headless-gl (ThreeJS and WebGL) for AWS Lambda. Potentially I am missing some intricacies of installing drivers or just a required library and I cannot get useful logs. I am trying to run node with ThreeJS/WebGL in a headless environment. The purpose of this is to package it all into an AWS Lambda function. Currently, I am testing in Docker with a clean lambci/lambda:build-nodejs12.x image (which should resemble amazon linux 2)

How to video-record selenium tests running headless inside a docker?

拈花ヽ惹草 提交于 2020-01-12 14:01:51
问题 I am running python-selenium tests inside a docker using a headless firefox. During these tests I am able to make screenshots with the selenium method for screenshots - but can I use something to 'video' record the virtual display during the whole test (several test scripts with several test methods, with many webdrivers started and stopped). So how can I video-record a complete test session? Addendum : I have found a webpage that describes exactly what I need: here. Unfortunately I get an

Running Chrome WebDriver on a linux server with no display

懵懂的女人 提交于 2019-12-28 08:10:31
问题 I'd like to run automated tests using selenium2's chrome webdriver on a linux server. I've already set up firefox to run on the server by using Xvfb (See http://www.semicomplete.com/blog/geekery/xvfb-firefox.html) and would like to do something similar with chrome. Is this possible? 回答1: I haven't been able to find a way to do this programmatically for the ChromeDriver like you can with the FirefoxBinary. I've submitted a improvement request which has a patch attached to allow this. You can

Headless protractor tests don't plug on Xvfb

感情迁移 提交于 2019-12-25 05:06:04
问题 I'm trying to run Protractor tests both in command line and with Jenkins. Both fail with the same error. Command line I opened a prompt and launched webdriver-manager start In another prompt, I launched Xvfb :42 -ac -screen 0 1024x768x24 & In a third one, I eventually launched protractor myconf.js Jenkins In my build, I checked "Start Xvfb before the build, and shut it down after.". I run the tests in a shell script. sh 'sudo webdriver-manager clean' sh 'sudo webdriver-manager update' sh

Headless protractor tests don't plug on Xvfb

爷,独闯天下 提交于 2019-12-25 05:05:03
问题 I'm trying to run Protractor tests both in command line and with Jenkins. Both fail with the same error. Command line I opened a prompt and launched webdriver-manager start In another prompt, I launched Xvfb :42 -ac -screen 0 1024x768x24 & In a third one, I eventually launched protractor myconf.js Jenkins In my build, I checked "Start Xvfb before the build, and shut it down after.". I run the tests in a shell script. sh 'sudo webdriver-manager clean' sh 'sudo webdriver-manager update' sh

How to attach pyautogui to the virtual display?

丶灬走出姿态 提交于 2019-12-23 05:01:29
问题 How do I attach pyautogui to the display in multithreaded mode? In the example of my code, pyautogui always has access to the upper display. Is it possible to have pyautogui control on each display? import os from selenium import webdriver from pyvirtualdisplay import Display import Xlib.display # ... # let's say i run this function in two threads def do_work(data): v_display = Display(visible=0, size=(900, 600)) v_display.start() # How can i attach v_display to the pyautogui? import

Error in running cucumber-jvm selenium test cases in headless mode under jenkins build

試著忘記壹切 提交于 2019-12-23 02:34:36
问题 Background I have a project desgined in spring-boot and maven. It contains cucumber-jvm selenium test cases which I want to run in headless mode in jenkins build. To do so, I have installed XVfb on jenkins build machine and also have made sure that Xvfb is running. $ps -ef | grep Xvfb root 3804 1 0 Sep29 ? 00:52:41 Xvfb -ac :99 -screen 0 1280x1024x16 Next, I am also exporting DISPLAY variable at the start of the build as follows, export DISPLAY=:99 Error The test fails to execute giving