Possible to open/display/render a headless Selenium session?


I know this is sort of counter to the purpose of headless automation, but...

I've got an automation test running using Selenium and Chromedriver in headless mode. I'd prefer to keep it running headless, but occasionally, it runs into an error that really needs to be looked at and interacted with. Is it possible to render and interact with a headless session? Maybe by duplicating the headless browser in a non-headless one? I can connect through remote-debugging, but the Dev Tools doesn't seem to do allow me to view the rendered page or interact with anything.

I am able to take screenshots, which sort of helps. But I'm really looking for the ability to interact--there's some drag-and-drop elements that aren't working well with Selenium that are causing issues occasionally.


What you are asking for is currently not possible. Further, such a "feature" would have nothing to do with Selenium, but the vendor of the browser. You can search their bug tracker to see if such a feature has already been requested.

The only currently available option is to run full GUI browser during debug / development of your tests.


<strong>No</strong>, it is not possible to open/display/render a headless Selenium session.

Following are the steps you can take as per your situation/requirement :


<em>Chromedriver in headless mode occasionally it runs into an error</em> : Put the error prone code block in a <a href="http://www.pythonforbeginners.com/error-handling/python-try-and-except" rel="nofollow">try-except</a> block and debug the root cause. You can take a screenshot as well.

</li> <li>

<em>Can I connect through remote-debugging</em> : No you won't be able to connect to any existing session. A detailed discussion <a href="https://stackoverflow.com/questions/47861813/how-can-i-reconnect-to-the-browser-opened-by-webdriver-with-selenium/47862867#47862867" rel="nofollow">here</a>.

</li> <li>

<em>Drag-and-Drop elements that aren't working well</em> : Get the page source and examine the elements and decide a proper <a href="https://stackoverflow.com/questions/48369043/official-locator-strategies-for-the-webdriver/48376890#48376890" rel="nofollow"><em>Locator Strategy</em></a>

</li> </ul>


  • How do I import data in one pillar file from another?
  • Database for Full Text Search and 200M+ Records
  • How to keep from duplicating path variable in ksh
  • Can my app be notified when another application starts/stops playing audio?
  • Client side validation mvc dropdown
  • Pre-populated SQLite Database not reading properly in Android Studio
  • Deploying a CodeRush plugin from the Community Site
  • Spring integration inbound-gateway Fire an event when queue is empty
  • How to override value that appears in a dropdown in the rails_admin gem
  • what makes a request a new request in asp.net C#
  • SQLite connection strategies
  • perl, mysql - fasting way to upload a csv file into mysql?
  • Dynamically switching connect in Modelica
  • Debugging VB6 Code From Visual Studio 2010
  • Scala multiline string placeholder
  • nonblocking BIO_do_connect blocked when there is no internet connected
  • Redux Form - Not able to type anything in input
  • System.InvalidCastException: Specified cast is not valid
  • How to add git credentials to the build so it would be able to be used within a shell code?
  • How can I extract results of aggregate queries in slick?
  • Get history of file changes from TFS to implement custom “blame”-behaviour of exceptions
  • Android - Material Design - NavigationView - How to put vertical scroll?
  • Installing iPhone App to iPhone
  • debug library loaded with ctypes using gdb
  • Read a local file using javascript
  • SignalR .NET Client Invoke throws an exception
  • Debugging ASP.NET on a built-in web server suddenly stops
  • Installing Hadoop, Java Exception about illegal characters at index 7?
  • Why is an OPTIONS request sent to the server?
  • Azure Cloud Service Web Role web pages do not load
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • Arrays break string types in Julia
  • VB.net deserialize, JSON Conversion from type 'Dictionary(Of String,Object)' to type '
  • Cannot Parse HTML Data Using Android / JSOUP
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • How get height of the a view with gone visibility and height defined as wrap_content in xml?
  • coudnt use logback because of log4j
  • Getting Messege Twice Using IMvxMessenger
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How to load view controller without button in storyboard?