Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cypress-iframe

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-iframe

Adds iframe support to Cypress

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is cypress-iframe?

The cypress-iframe npm package provides custom commands for handling iframes in Cypress tests. It simplifies the process of interacting with elements within iframes, which can be challenging with standard Cypress commands.

What are cypress-iframe's main functionalities?

Loading an iframe

This command checks if the iframe with the specified selector has loaded. It ensures that the iframe content is fully loaded before proceeding with further actions.

cy.frameLoaded('#my-iframe')

Switching to an iframe

This command switches the context to the specified iframe and allows you to interact with elements inside it. In this example, it finds a button inside the iframe and clicks it.

cy.iframe('#my-iframe').find('button').click()

Custom iframe selector

This command allows you to specify an iframe by its URL and then interact with elements inside it. In this example, it finds an h1 element inside the iframe and checks if it contains the text 'Example Domain'.

cy.iframe({ url: 'https://example.com' }).find('h1').should('contain', 'Example Domain')

Other packages similar to cypress-iframe

Keywords

FAQs

Package last updated on 01 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc