Questions tagged [headless-browser]

A headless browser is a web browser without a graphical user interface. They are used to provide content of web pages to other programs.

A headless browser is a browser without a GUI. In most cases, it can be accessed from a command line.

They are typically used for automated testing of websites.

Examples include:

748 questions
4
votes
2 answers

HtmlUnit not creating HtmlPage object

I'm very new to HtmlUnit and I'm trying to scrape a website that uses Javascript to edit the code. I heard HtmlUnit was the best way to go as it returns the final code using a headless browser. However as you will see I cannot even get past…
quantum285
  • 1,032
  • 2
  • 11
  • 23
4
votes
2 answers

headless-selenium-for-win using Python

I found a headless IE from this github project headless-selenium-for-win Which has the following files desktop_utils.exe headless_ie_selenium.exe I extracted these files to C:\Selenium\headless-selenium I used Selenium Python library to control…
Balakrishnan
  • 2,403
  • 2
  • 26
  • 47
4
votes
2 answers

protractor with any headless browser?

I am using protractor and it works when I specify chrome as the browsertype. I am looking for a headless browser sample code, I have looked for phantomJs but I could not run any of them. Is there a working sample available of another headless…
Pindakaas
  • 4,389
  • 16
  • 48
  • 83
4
votes
1 answer

Run Safari browser headlessly using xvfb on Mac

How do I run my jstestdriver test cases headlessly on Safari browser on OSX platform? I am able to achieve the same on Linux by using xvfb-run command. However, there is no such wrapper command available in OSX. I tried executing the following 2…
Maya
  • 95
  • 1
  • 3
  • 7
4
votes
4 answers

selenium webdriver.Firefox not starting for non-sudo user

I have a python method that sets up a browser in headless-mode on a linux server for website scraping with selenium. The display gets setup perfectly fine regardless of which user executes the python script but if the sudo user doesn't execute the…
sadmicrowave
  • 39,964
  • 34
  • 108
  • 180
4
votes
1 answer

how to automate drag and drop of files into a headless browser's window?

I'm building a web application which involves drag'n'dropping of files from user's system into browser's window. I want to automate the user's interaction with the UI using one of the headless browsers available (for the purpose of test driven…
Nek
  • 1,909
  • 20
  • 31
4
votes
2 answers

Is there any way to record an action using PhantomJs/CasperJS or similar headless browser?

Ok, here is a brief description of problem I'm trying to find a solution for. Let's say we have an online service that can automate different online tasks (clicking on a link, navigate to the page, choose an option from a combo box and finally copy…
abtvah
  • 51
  • 5
4
votes
1 answer

How to run a jasmine spec in headless mode in Travis-CI?

I am looking for some ideas on how can I run my jasmine spec on travis-ci in a headless mode. I am looking to use chrome for the headless browser. I followed this blog post to set up my travis builds with chrome to start and I think chrome is…
Indradhanush Gupta
  • 4,067
  • 10
  • 44
  • 60
4
votes
2 answers

Execute browser page/javascript from a script/command-line

Hope this isnt a stupid question. I have recently had an idea about something which I am very curious about. I am a fan of Node.js (not really relevent here I think) and the V8 engine but I was wondering if its possible to run a browser (get it to…
Craig Taub
  • 4,169
  • 1
  • 19
  • 25
4
votes
3 answers

Access all loaded resources with Capybara or similar

I’m looking for a possibility to easily access and list all resources loaded after a web page document has started to load: scripts, images, stylesheets, etc. using a headless browser. I'm interested in the files' url, status code and type…
polarblau
  • 17,649
  • 7
  • 63
  • 84
4
votes
2 answers

Specflow headless browser tests that support javascript/ajax

I have been using WatiN for my BDD Specflow tests. It does the job, but it is slow. I recently encountered SimpleBrowser as suggested in this article. SimpleBrowser is significantly quicker than Watin. The main disadvantage is that it does not…
Karan
  • 14,824
  • 24
  • 91
  • 157
4
votes
2 answers

Run Headless JsTestDriver?

Is there a way to use jsTestDriver in a headless state where it loads the browsers but does so headlessly (you can't see the browser) or it loads them minimized?
Levi Hackwith
  • 9,232
  • 18
  • 64
  • 115
3
votes
3 answers

PHP chrome-php / headless-chromium-php error

I have been using the chrome-php & headless-chromium libraries for few months without any issues but now I get this error. Does anyone know why this would start happening? Thanks. Fatal error: Uncaught Wrench\Exception\HandshakeException: No accept…
virap
  • 85
  • 1
  • 9
3
votes
0 answers

ScreenRecording a headless browser using xvfb with ffmpeg or jmf jar(java) shows distorted video in container, if the resolution greaterthan 1024x768

I am getting a proper video output, if i used to record a screen resolution for about 1024x768(max) or lesser. but whenever i used to increase the resolution like "1600x900 or 1920x1080 or greater than 1024x768 (approx.)", i am getting distorted…
3
votes
0 answers

How to keep current browser data on headless:true mode in puppeteer

I've a puppeteer script which works as expected when it's headless:false mode with Google Chrome profile and executablePath because I need to keep all sessions and browser data every time when I use the script, it also has chrome extension which…