Cypress Tutorial
Selected Reading
- Cypress - Discussion
- Cypress - Useful Resources
- Cypress - Quick Guide
- Cypress - GitHub
- Cypress - Plugins
- Cypress - Reports
- Cypress - Configuration of JSON File
- Cypress - Hooks
- Cypress - Environment Variables
- Cypress - Fixtures
- Cypress - Custom Commands
- Cypress - Debugging
- Cypress - Screenshots and Videos
- Cypress - Dashboards
- Cypress - Prompt Pop-up Window
- Cypress - Data Driven Testing
- Cypress - File Upload
- Cypress - Get and Post
- Cypress - Cookies
- Cypress - Mouse Actions
- Cypress - Web Tables
- Cypress - Frames
- Cypress - Hidden Elements
- Cypress - Child Windows
- Cypress - Alerts
- Cypress - Dropdown
- Cypress - Tabs
- Cypress - Checkbox
- Cypress - jQuery
- Cypress - Working with XHR
- Cypress - Asynchronous Behavior
- Cypress - Text Verification
- Cypress - Assertions
- Cypress - Locators
- Cypress - Aliases
- Cypress - Variables
- Cypress - Basic Commands
- Cypress - Supported Browsers
- Cypress - Build First Test
- Cypress - Test Runner
- Cypress - Architecture and Environment Setup
- Cypress - Introduction
- Cypress - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Cypress - Child Windows
Cypress - Child Windows
飓风没有与儿童窗口合作的具体指挥。 它有一套处理儿童窗户的工作方式。 在《html法典》中,由于属性目标,儿童窗口的连接点或纽扣。
如果目标属性有价值空白,就会打开儿童窗口。 气旋风暴使用“灰色”法,由Cypress公司援引。 删除后删除了作为援引方法参数之一的属性。
Once the target=blank is removed, then a pnk/button opens in the parent window and after performing operations on it, we can shift back to the parent URL with the go command.
《Html法》在Cypress开设儿童窗口如下:
![Opening a New Window](/cypress/images/opening_a_new_window.jpg)
Implementation
下面是Cypress儿童窗户的指挥系统。
describe( Tutorialspoint , function () { // test case it( Scenario 1 , function (){ // url launch cy.visit("https://the-internet.herokuapp.com/windows") // delete target attribute with invoke for pnk cy.get( .example > a ) .invoke( removeAttr , target ).cpck() // verify child window url cy.url() .should( include , https://the-internet.herokuapp.com/windows/new ) // shift to parent window cy.go( back ); }); });
产出如下:
![New Window](/cypress/images/new_window.jpg)
产出记录显示删除了目标属性,并在母窗户内启用儿童窗口。
Advertisements