Learn Cypress testing with Amir Rustamzadeh in Melbourne, Australia

Register for the Workshop

Cypress.arch

Improve this doc

Cypress.arch returns you the CPU architecture name of the underlying OS, as returned from Node’s os.arch().

Even though Cypress runs in the browser, it automatically makes this property available for use in your tests.

Syntax

Cypress.arch // 'x64'

Examples

CPU Architecture

it('has expected CPU architecture', function () {
  expect(Cypress.arch).to.be.oneOf(['x64', 'ia32'])
})

Conditionals

it('does something differently', function () {
  if (Cypress.arch === 'x64') {
    cy.exec('something')
  } else {
    cy.exec('something else')
  }
})

History

Version Changes
1.1.3 Cypress.arch added