---
id: api/cypress-api/browser
title: Cypress.browser | Cypress Documentation
description: Cypress.browser returns you properties of the browser.
section: api
source_path: docs/api/cypress-api/browser.mdx
version: e6988a974973e9090ce70406c38cb2b9e0eac9fa
updated_at: '2026-05-15T15:50:22.536Z'
---
# Cypress.browser

`Cypress.browser` returns you properties of the browser.

## Syntax

```
Cypress.browser // returns browser object
```

The object has the following properties:

| Property | Type | Description |
| --- | --- | --- |
| `channel` | `string` | Release channel of the browser, such as `stable`, `dev`, or `canary`. |
| `displayName` | `string` | Human-readable display name for the browser. |
| `family` | `string` | Rendering engine being used. `chromium` or `firefox`. |
| `isChosen` | `boolean` | Whether the browser is selected in the browser selector of Cypress. |
| `majorVersion` | `number` | `string` | The major version number of the browser. |
| `name` | `string` | Machine-friendly name, like `chrome`, `electron`, or `firefox`. |
| `path` | `string` | Path to the browser on disk. Blank for Electron. |
| `version` | `string` | Full version. |
| `isHeadless` | `boolean` | Whether the browser is running headlessly. |
| `isHeaded` | `boolean` | Whether the browser displays headed. |

## Examples

### Log browser information

#### `Cypress.browser` returns browser object

```
it('log browser info', () => {  console.log(Cypress.browser)  // {  //   channel: 'stable',  //   displayName: 'Chrome',  //   family: 'chromium',  //   isChosen: true,  //   majorVersion: 80,  //   name: 'chrome',  //   path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',  //   version: '80.0.3987.87',  //   isHeaded: true,  //   isHeadless: false  // }})
```

### Conditionals

#### Check that Chrome specific styles are applied

```
@media and (-webkit-min-device-pixel-ratio: 0) {  .header {    margin-right: 0;  }}
```

```
it('has correct Chrome specific css property', () => {  // if in Chrome, check css property was properly applied  if (Cypress.browser.name === 'chrome') {    cy.get('.header').should('have.css', 'margin-right').and('eq', '0')  }})
```

#### Screenshot only in headless browser

```
Cypress.Commands.overwrite(  'screenshot',  (originalFn, subject, name, options) => {    // only take screenshots in headless browser    if (Cypress.browser.isHeadless) {      // return the original screenshot function      return originalFn(subject, name, options)    }    return cy.log('No screenshot taken when headed')  })// only takes in headless browsercy.screenshot()
```

## History

| Version | Changes |
| --- | --- |
| [3.0.2](/llm/markdown/app/references/changelog.md#3-0-2) | `Cypress.browser` introduced |

## See also

*   [Browser Launch API](/llm/markdown/api/node-events/browser-launch-api.md)
*   [Cross Browser Testing](/llm/markdown/app/guides/cross-browser-testing.md)
*   [Cypress.isBrowser](/llm/markdown/api/cypress-api/isbrowser.md)
*   [Launching Browsers](/llm/markdown/app/references/launching-browsers.md)
