English 中文(简体)
Cypress - Quick Guide
  • 时间:2024-03-24 08:53:03

Cypress - Quick Guide


Previous Page Next Page  

Cypress - Introduction

风暴是一种开放源和免费的测试自动化工具,可长期广泛使用。 该软件主要用于前端测试自动化。 这一工具主要用来解决工作队面临的问题,同时使申请自动化。

飓风有助于实现以下目标:

    垃圾检查。

    垃圾检查。

    紧急检测。

    查明错误(如果有的话)。

Sel和Cypress经常从其功能上加以比较。 然而,热带风暴在结构和特征方面有所不同。 此外,它解决了我们在塞伦堡面临的一些问题。

风暴以 Java印为基础,在浏览器内进行测试。 它有助于进行包括以下在内的测试:

    单位测试。

    停止测试。

    融合测试。

Features

热带风暴的重要特征如下:

    支持测试驱动器的开发。

    提供达什板服务。

    与开发工具的有效脱色,同时产生ack痕和错误。

    提供测试失败的屏幕。

    没有必要再等待一段时间停止处决。 在执行以下步骤或主张之前,先适用这些等待。

    不妨监测和控制服务器反应、功能和时间的特征,这些特征是进行单位测试所需要的。

    检查和管理网络交通。

    允许多浏览器的支持。

    载有处决录像的内在特征。

    能够与不断整合的工具相结合。

    网页对浏览量的反应。

    重载改动适用于违约测试。

    可提供友好应用方案拟订接口。

    现有测试操作员,可直接从用户界面处进行测试。

Disadvantages

使用“旋风”有一些不利之处,它们列于下文:

    它仅以 Java本为基础。

    一个相对较新的工具,因此社区支助并不广泛。

    它无法进行流动检测。

    影子文件 不能进入目标模型。

    塔夫/儿童窗口由工作管理。

Cypress - Architecture and Environment Setup

图2

Cypress Architecture

以上图表的来源是:http://www.tutorialspoint.com/cypress-architecture-test-automation”https://www.tutorialspoint.com/cypress-architecturetest-automation

诸如Selenium等自动化工具在浏览器之外运行。 然而,热带风暴具有不同的结构。 它设在浏览器内。 风暴基本上以服务器为基础——Node.js。

热带风暴与Node.js继续相互交流,相互协调。 因此,可以利用Cypress测试申请的门面和背后。

因此,Cypress公司能够实时处理在ID公司执行的任务,同时能够在浏览器之外开展行动。

Difference between Cypress and Selenium

The basic differences between Cypress and Selenium are psted below -

Cypress Selenium
It is based on Javascript. It is based on Java, C#, Python and JavaScript.
It has small community support It has big community support.
It includes an in-built video capture feature. There is no in-built video capture feature.
No APIs are available to handle the tabs/child windows. APIs available to handle tabs/child windows.
No parallel execution can be performed. Parallel execution can be performed.
Only installation of npm needed. Supplemental Jars, pbraries, and so on are required to be added as project dependencies.

Cypress Environment Setup

For Cypress environment setup, visit the connection - 。 屏幕如下:

Nodejs

应为Windows和macOS Installer。 我们必须按照当地作业制度获得一揽子计划。

对于64轨Windows配置,下面的安装是为了节省安装机。

Node.v14.15

一旦安装完毕,在方案档案中就建立了 no子档案。 应当注意到这一档案的道路。 之后,从启动阶段进入环境变量如下:

Environment Variables

在该系统中,有人到高级,点击环境变量。 然后点击科索沃。

System Properties Advance

在环境变量中,可渗透到系统变量部分,点击新。

System Variables

进入NODE_HOME and the node.js path (前注) in the Variable name and the Variable Value areas each in the New System Variable pop-up。

New System Variables

这条路一经走。 j 档案是固定的,我们将在任何预期地点制造一个空洞的夹(例如气压)。

其次,我们需要有一位 Java本编辑来撰写《风暴守则》。 为此,我们可以从https://code.icstudio.com/上下载《演播室视觉守则》。

按照当地业务制度,选择正确的一揽子方案——

Local Operating System

一旦下载可执行的文件,完成所有安装步骤,即启动《演播室视觉守则》。

Visual Studio

选择从档案菜单中选取开放式Folder。 接着,在《演播室视觉法》中添加“CypressAutomation”的夹(我们此前已经创建)。

Cypress Automation Folder

我们需要制定一揽子计划。 json卷宗,由终端指挥:

如下文所述,我们必须详细了解包装名称、描述等等。


npm init

一揽子计划一旦完成。 json案卷是在该项目的夹子内制作的,有我们提供的信息。

Package

一揽子计划一旦完成。 json案卷是在该项目的夹子内制作的,有我们提供的信息。

Project Folder

最后,安装“旋风”指挥系统如下:


npm install cypress --save-dev

你们将获得以下产出:

Install Cypress

Cypress - Test Runner

热带风暴探测器有助于触发试验执行。 当我们完成Cypress安装时,如下文所述,该终端工具提出了一项建议:


You can open Cypress by running − node_modules/.bin/cypress open

为了开放试验航道,我们必须掌握以下所述指挥系统:


node_modules/.bin/cypress open

测试窗口在一段时间后打开,其信息是,Cypress在实例夹中提供了项目夹结构样本。

OK! 纽伦。 在您的电脑上播放的屏幕如下:

Test Runner

然后启动测试跟踪仪,如下文所述,在实例夹下提供不止一个光谱文档。

Files

例如,为了管理一个具体档案,我们必须点击它。 此外,还有停止处决的办法。

test2.spec.js

The execution shall begin with the following screen showing the test steps, name of test case, test suite, URL, test duration, dimension of browser, and so on.

Dimension of Browser

Cypress - Build First Test

一旦气旋风暴混杂,在该项目内便建立了框架,在探索者中自动看到这一框架。 如下文所述,新的试验文件(第一份试验)应在集成夹内建立。

Integration Folder

Cypress Folder Structure

让我们理解热带风暴的多重结构。 The factors which are included in a Cypress, are below -

    此处保留了试验数据,其形式是测试的关键数值。

    在此保留了框架的测试案例。

    - 此处保留“旋风”事件(为了测试而实施的原始和后活动)。

    - 可使用的方法或定制的指挥系统,可直接通过测试案例加以利用,但在此不设目标。

    videos——执行测试步骤以录像形式记录并在此保存。

    node_modules——项目从零开始的依赖性保留在这一倍中。 这是Cypress项目执行的核心。

    cypress.json-Default formations in this chainer. 现有组合的数值可以在此修改,从而推翻了缺省组合。

    包装,json - 这些项目的属性和文字都保留在这个方面。

Structure of a Basic Test

气旋沿袭了 Java本试验框架(Mocha、Jasmine等)。 为了在气旋风暴中进行试验,我们必须遵守以下框架准则——

    必须在描述功能中提供试样名称。

    试卷中的试样子必须在同一栏内提供,或必须具体说明功能。

    试验案件中的试验步骤必须在试验室内实施。

Basic Test Implementation

可以通过使用以下指挥——进行基本测试。


// test suite name
describe( Tutorialspoint Test , function () {
// Test case
   it( Scenario 1 , function (){
      // test step for URL launching
      cy.visit("https://www.google.com/");
   });
});

上文所用的镜头并不要求使用物体。 在安装 no子模块时,可以不停地提供。

Test Execution

为执行,从指挥线起,指挥如下:


./node_modules/.bin/cypress run

这里,综合文件夹内的所有档案都已经启动。

为执行,从试验操作起,指挥如下:


./node_modules/.bin/cypress open

然后,点击我们想要触发执行的具体卷宗。

为了触发执行指挥线下的具体档案,指挥线如下:


cypress run --spec "<spec file path>"

以下屏幕将登在你的电脑上:

Specific File from Command pne

Cypress - Supported Browsers

气球可以在 Chrome、电、和 Firefox等浏览器中进行检测。 在测试台上,我们有选择选择右上角的浏览器。

此外,必须指出的是,如果无法提供浏览器选择,就意味着我们系统没有最新的浏览器。

Cypress Electron

Execution from Other Browsers

指挥线其他浏览器的处决情况如下:

为了在 Chrome进行迫害,你需要掌握以下所述指挥系统:


./node_modules/.bin/cypress run -- browser chrome

你可以看到以下屏幕:

Execution in Chrome

操作execution in ,指挥如下:


./node_modules/.bin/cypress run -- browser firefox

你可以看到以下屏幕:

Execution in Headed Mode,

进行为首的迫害,指挥如下:


./node_modules/.bin/cypress run -- headed

从指挥线上看,如果没有具体规定选择,Cypress会以无头的方式进行检测。

Cypress - Basic Commands

气压基本指挥系统如下:

and

它被用来制造一种说法,并且是(......)应当做到的内容。

使用情况如下:


//element is visible & enabled
cy.get( #txt ).should( be.visible ).and( be.enabled )
//element is checked
cy.contains( Subject ).and( be.checked )

as

它规定了以后使用的内容。

使用情况如下:


//apas element as parent
cy.get( #txt ).find( p ).first().as( parent )

blur

它混淆了重点内容。

使用情况如下:


//blur input
cy.get( #txt ). type( abc ).blur()

check

它检查了无线电塔顿或检查箱,并适用于有投入标记的部件。

使用情况如下:


//checks element having class attribute chkbox
cy.get( .chkbox ).check()

children

它获得一个要素的子要素。

使用情况如下:


//obtains children of element n
cy.get( n ).children()

clear

它从文字或投入中删除了价值。

使用情况如下:


//removes input abc
cy.get( #txt ). type( abc ).clear()

clearCookie

它排除了一种特殊的浏览器 co。

使用情况如下:


//clear abc cookie
cy.clearCookie( abc )

clearCookies

它从现有的领域和次域中排除了浏览器 co。

使用情况如下:


//clear all cookies
cy.clearCookies()

clearLocalStorage

它将当地储存数据从现有域和次域中删除。

使用情况如下:


//clear all local storage
cy. clearLocalStorage ()

cpck

它点击了文件目标模型中的一个要素。

使用情况如下:


//cpck on element with id txt
cy.get( #txt ).cpck()

contains

It obtains an element having a specific text. The element can have more than the text and still match.

使用情况如下:


//returns element in #txt having Tutor text
cy.get( #txt ).contains( Tutor )

dblcpck

文件目标模型(DOM)的一个要素是重复计算。

使用情况如下:


//double cpcks element with id txt
cy.get( #txt ).dblcpck()

debug

它固定了一个夸张的标志,并按先前的指挥归还了原木价值。

使用情况如下:


//pause to debug at start of command
cy.get( #txt ).debug()

document

它获得窗户。 积极网页上的文件。

使用情况如下:


cy.document()

each

它通过一系列具有财产长度的阵列进行修复。

使用情况如下:


//iterate through inspanidual p
cy.get( p ).each(() => {...})

end

它结束了指挥链。

使用情况如下:


//obtain null instead of input
cy.contains( input ).end()

eq

它指的是一系列要素中某一指数的一个要素。

使用情况如下:


//obtain third td in tr
cy.get( tr>td ).eq(2)

exec

它指挥系统。

使用情况如下:


cy.exec( npm init )

find

它获得某个特定地点后裔。

使用情况如下:


//obtain td from tr
cy.get( tr ).find( td )

first

它从一组要素中获得第一个要素。

使用情况如下:


//obtain first td in tr
cy.get( tr>td ).first()

get

它通过定位器获取单一或多个元素。

使用情况如下:


//obtain td from tr

find

它获得某个特定地点后裔。

使用情况如下:


//obtain all td from tr in pst
cy.get( tr>td )

getCookie

它通过名称获得一个特定的浏览器 co。

使用情况如下:


cy.getCookie( abc )

getCookies

它获得所有厨师。

使用情况如下:


cy.getCookies()

go

它向前发展,或向下届或以前在浏览过程中的URL迈进。

使用情况如下:


//pke cpcking back button
cy.go( back )
//pke cpcking forward button
cy.go( forward )

visit

罗马尼亚

使用情况如下:


cy.visit( https://www.tutorialspoint.com/index.htm )

next

It obtains the immediate sibpng of an element within a group of elements in Document Object Model (DOM).

使用情况如下:


//gives the following pnk in element l.
cy.get( l a:first ).next()

parent

它从人力部的一组要素获得母子成分。

使用情况如下:


//get parent of element with class h
cy.get( .h ).parent()

should

它被用于制造一种说法,是(......)和(b)项的内容。

使用情况如下:


//assert element is visible & enabled
cy.get( #txt ).should( be.visible ).and( be.enabled )

wait

一段时间内,在移动以下步骤之前,在摩擦中,或在别的元件中 Wa。

使用情况如下:


cy.wait(1000)

title

它获得该文件。 页: 1

使用情况如下:


cy.title()

viewport

它管理屏幕的尺寸和定位。

使用情况如下:


// viewport to 100px and 500px
cy.viewport(100, 500)

log

它向陆军司令部印刷了电文。

使用情况如下:


cy.log( Cypress logging  )

reload

用于上页。

使用情况如下:


cy.reload()

Cypress - Variables

在“旋风”中,有变数,如var、肥料等。 在进行封锁的同时,我们可以使用未经转让而获得的物品。 但是,当我们与 mu客合作时,情况并非如此。

当反对改变其特性时,我们可能需要将其先前的价值与其新价值进行比较。

Code Implementation

我们可以通过使用以下所述指挥——来实施守则。


cy.get( .btn ).then(($span) => {
   // value capture before button cpck and stored in const
   const n = parseInt($span.text())
   cy.get( b ).cpck().then(() => {
      // value capture after button cpck and stored in const
      const m = parseInt($span.text())
      // comparison
      expect(n).to.eq(m)
   })
})

In the above case, we are using const variables since object $span is undergoing change. While deapng with mutable objects and its value, it is recommended to use variables of type const.

Cypress - Apases

飓风是具有多种用途的重要组成部分。 这些用途如下:

Sharing Context

我们必须利用......(a)来分析我们必须分享的东西。 除其他外,还使用Mocha背景物体。 可从中获取其他物体。

违约后,所有用于测试的hoo子都有共同的环境,而其他财产则在进行试验后挥发。


describe( element , () => {
   beforeEach(() => {
      cy.wrap( eleone ).as( x )
   })
   context( subelement , () => {
      beforeEach(() => {
         cy.wrap( eletwo ).as( y )
      })
         it( apases properties , function () {
            expect(this.x).to.eq(  eleone  )
            expect(this.y).to.eq(  eleone  )
         })
      })
   })
})

我们能够通过分享环境处理固定装置。 我们还可以使用星号,即星号,在“@文号”的帮助下(而不是使用这一编号*)接触他人。 这是一个同步的指挥。


beforeEach(() => {
   // apas fixtures
   cy.fixture( users.json ).as( u )
})
it( scenario , function () {
   //  @  to handle apases
   cy.get( @u ).then((u) => {
      // access element argument
      const i = u[0]
      //verification
      cy.get( header ).should( contain , u.name)
   })
})

Elements

Apas可以使用文件目标模型(DOM)要素,随后再使用。 下面的例子是,Cypress在缺席的情况下提到了作为 apa获得的拖 collection。 为了使用同样的栅栏,我们必须使用方言。


// apas td in tr
cy.get( tr ).find( td ).as( cols )
cy.get( @cols ).first().cpck()

当我们使用“@”时,用“C”类气压来探照相(栏)并得出其参考。

Routes

可使用路线利用航道。 委员会确保申请已经提出。 然后,它等待服务器的答复,并查阅核查请求。


cy.intercept( POST ,  /users , { id: 54 }).as( u )
cy.get( #btn ).cpck()
cy.wait( @u ).then(({ request }) =>{
//assertion
   expect(request.body).to.have.property( name ,  User )
})
cy.contains( User added )

Requests

可根据请求利用申请。 我们可以提出请求,随后使用其财产。 可采取以下行动:


cy.request( https://jsonplaceholder.cypress.io/comments ).as( c )
// other implementations if any
cy.get( @c ).should((response) => {
   if (response.status === 404) {
      // assertion
         expect(response).to.have.property( duration )
      } else {
         // do something else
      }
   })
})

Cypress - Locators

风暴只支持CSS挑选人员确定这些要素。 然而,它也能够在Cypress-Xpath plugin的帮助下与xpath合作。

让我们考虑制定《html法典》,并理解一些表达规则。

CSS Expression

Rules of CSS expression

The Rules of Cascading Sheets (CSS) expression are as follows -

    带有归属感和标签的协同效应是标号(此处,标语应为——投入编号。

    具有属性阶级和标签的Syntax是标签。 这里的标语应是投入。

    具有任何属性价值和标签的元件为正值。 此处的标语应为:投入[标题=搜索]。

    父母与儿童 trav亲的结合是父母子女—— 在这里,表达的语气应该——tr。

气旋风暴暴露了露天游乐场的特点,我们可以从中找到和确定一些元素。 这一特征存在于测试的Runner窗口内,在以下图像中得到了强调。

Test Runner Toolbar

在点击露天游乐场时,发现一只arrow子。 浮标,将其移至我们必须确定的内容。 这些陈词在野外的地圈中散布,只靠arrow子的权利。

同时,正如以下形象所示,内容也得到了强调:

Tutorialspoint Scenario1

Cypress - Assertions

飓风从Mocha、Chai等各种图书馆获得的不止一种说法。 这种说法是明确和暗含的。

Imppcit Assertions

如果断言适用于从母公司在链条下获得的物体,则称为默示主张。 民众的含蓄说法包括......和/或应当。

这些指挥不能单独使用。 一般来说,当我们必须核实对某一物体的多次检查时,就使用了这些检查。

让我们以以下实例说明默示的断言:


// test suite
describe( Tutorialspoint , function () {
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://www.tutorialspoint.com/videotutorials/index.php")
		// assertion to vapdate count of sub-elements and class attribute value
		cy.get( .toc chapters ).find( p ).should( have.length ,5)
		.and( have.class ,  dropdown )
   });
});

产出如下:

Imppcit Assertions

产出记录显示,有两种说法,有线索和指挥。

Exppcit Assertions

如果主张直接适用于物体,则称为明确主张。 民众的明确主张包括主张/怀疑。

明确声称的指挥如下:


// test suite
describe( Tutorialspoint , function () {
// it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
		// identify element
      cy.get( h1#headingText ).find( span ).then(function(e){
         const t = e.text()
         // assertion expect
         expect(t).to.contains( Sign )
      })
   })
})

产出如下:

Exppcit Assertions

产出记录显示,直接适用于预期指挥的物体。

Cypress has Default Assertions which are internally handled and do not require to be invoked specifically.

实例很少:

    cy.visit () - Expects the page to show the content with 200 status Code.

    cy.request () - Expects that the small services to be available and sent a response.

    cy.contains () - Expects the web elements with its nature to be available in DOM.

    cy.get () - Expects the web elements to be available in DOM.

    .find () - Expects the web elements to be available in DOM.

    类型()——要求网络要素转向一个有能力的国家。

    .cpck () - Expects the web elements to goable state.

    . . . . . . . . - 现有专题的网络要素财产的前景。

Other Cypress assertions

其他的“旋风”说法如下:

length

它检查了从前线指挥中获取的内容。

例如,


cy.get( #txt-fld ).should( have.length ,5)

value

它检查了网站内容是否具有一定价值。

例如,


cy.get( #txt-fld ).should( have.length ,5)

value

它检查了网站内容是否具有一定价值。

例如,


cy.get(  #txt-fld ).should( have.value ,  Cypress )

class

它检查网站内容是否具有某种类别。

例如,


cy.get( #txt-fld  ).should( have.class ,  txt )

contain

它检查了网站内容是否具有某种文本。

例如,


cy.get( #txt-fld  ).should( contain ,  Cypress )

visible

它检查网站内容是否明显。

例如,


cy.get( #txt-fld  ).should( be.visible )

exist

它检查网站内容是否可在文件目标模型中查阅。

例如,


cy.get( #txt-fld  ).should( not.exist );

css

它检查网络元素是否拥有某种财产。

例如,


cy.get( #txt-fld  ).should( have.css ,  display ,  block );

Cypress - Text Verification

方法文本可用于获取网络内容的文本。 还可以添加一些建议,以核实案文内容。

Implementation with text()

Given below is the command for the implementation with text() with regards to verification −


// test suite
describe( Tutorialspoint , function () {
   // it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
      // identify element
      cy.get( h1#headingText ).find( span ).then(function(e){
         //method text to obtain text content
         const t = e.text()
         expect(t).to.contains( Sign )
      })
   })
})

产出如下:

Implementation with Text()

产出记录显示用文字方法获得的文本标语。

Implementation with text assertions

我们还可以在以下指挥机构的帮助下,在网络要素文本上执行主张:


// test suite
describe( Tutorialspoint , function () {
   // it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
      // verify text with have.text
      cy.get( h1#headingText ).find( span ).should( have.text , Sign in )
   })
})

产出如下:

Implementation with Text Assertions

产出记录显示对案文的核查,应当加以说明。

Cypress - Asynchronous Behavior

风暴源于基于 Java本的诺季。 气压指令的性质是同步的,因为它们依靠的是 no器。 同步流动意味着测试步骤并不取决于其先前的执行步骤。

没有依赖性,每个步骤都是作为独立身份实施的。 尽管测试步骤是按顺序安排的,但个别测试步骤并不考虑先前步骤的结果,只是执行。

下面是热带风暴中同步行为的例子:


// test suite
describe( Tutorialspoint , function () {
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
      // identify element
      cy.get( h1#headingText ).find( span ).should( have.text ,  Sign in )
      cy.get( h1#headingText ).find( span ).then(function(e){
         const t = e.text()
         // get in Console
         console.log(t)
      })
      // Console message
      console.log("Tutorialspoint-Cypress")
   })
})

产出如下:

Asynchronous Behavior in Cypress

Promise

测验Runner和点击Inspect,我们可以核实科索尔的成果。 这里,Tutorialspoint-Cypress(较早的一步)在Sign - in之前就登在康索尔。 (后加一步)。

气压指令的设计方式是,每一步骤都按顺序执行,而不是同时启动。 但是,它们相互背后。 因此,这种流动是同步的。 这样做是明智的。

在上述例子中,console.log是一份纯 Java本声明。 它没有能力与Cypress指挥部相近并等待。 明智之举使我们得以以序列方式执行气旋风暴指挥。

Modes in Promise

通知有三种方式,可以归类指挥执行状态。 它们是:

    如果试验步骤成功实施,就会产生这一结果。

    如果正在等待试验步骤的结果,这就是结果。

    如果试验步骤失败,结果就是这样。

只有在成功执行先前的步骤或获得解决的承诺反应的情况下,热带风暴指挥部才得以执行。 之后,该方法被用于在Cypress实施Promise。

下面是“Cypress”中的“Promise”的例子。


describe( Tutorialspoint Test , function () {
   it( Promise , function (){
      return cy.visit( https://accounts.google.com )
      .then(() => {
         return cy.get( h1#heading );
      })
   })
})

用于Promise的气旋风暴的安装速度不明显。 因此,它有助于制定一部更严格的法典。 而且,我们不必在使测试自动化时考虑是否明智。

Implementation without Promise

指挥后解释了如何在没有“旋风”承诺的情况下执行。


describe( Tutorialspoint Test , function () {
   it( Without Promise , function (){
      cy.visit( https://accounts.google.com )
      cy.get( h1#heading )
   })
})

Cypress - Working with XHR

XHR is XML HTTP Request. 它是“应用方案拟订接口”,作为目标提供,其方法在网络浏览器和服务器之间传送数据。 XHR的物体可要求服务器以答复形式提供数据。

气压不仅可用于前端自动化,而且可以通过直接接触XHR物体来控制网络的交通。 然后,它适用对物体的断言。 它可以改变或阻碍反应。 在浏览器上填写的网络中可以看到XHR的细节。

XHR的回应负责人如下:

XHR Response Header

答复如下:

Response

为了提出XHR的要求,使用了cy(request)指挥系统。 采用的方法是将答复转向对等要求。

Implementation of XHR request

下面是关于在Cypress执行XHR请求的指挥部。


cy.request( https://jsonplaceholder.cypress.io/comments ).as( c )
//apasing request
cy.get( @c ).should((response) => {
   expect(response.body).to.have.length(100)
   expect(response).to.have.property( headers )
})

Cypress - jQuery

风暴可以在其内部指挥下对 j子及其方法采取行动。 虽然Cypress利用这种方法确定一个网络要素,但JQuery为此目的使用了()美元的方法。

在Cypress,确定网络要素的指挥如下:


cy.get( h1#heading )

而如果是 j,则确定网络要素的指挥如下:


$( h1#heading )

飓风以 Java为基础,Script本具有不同步的性质。 然而,热带风暴指挥部通过在内部解决 Pro声而have然地行事,而后者从终端用户那里隐蔽。

然而,当Cypress对j Query物体及其方法采取行动时,必须具体实施Promise逻辑,使流量同步(在方法的帮助下)。

例如,虽然我们想摘录一个网络要素(用jQuery方法——案文)的内容,但我们要求采用当时的方法执行《意见》。

Promise Implementation in jQuery

以下是在酒吧执行红丝虫的指挥系统。


// test suite
describe( Tutorialspoint , function () {
// it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
      // Promise implementation with then()
      cy.get( h1#headingText ).find( span ).then(function(e){
         //method text to obtain text content
         const t = e.text()
         expect(t).to.contains( Sign )
      })
   })
})

在Kj Query,如果提供的定位器与OMS的任何网络元素不匹配,则将进行空洞收集。

为了避免出现例外情况,建议核实酒类的收集时间长度为(a)美元。 指挥部门如下:


const e = $( #txt )
if (e.length > 0){
   //proceed
}

然而,如下文所示,如果在OMM没有相应的网络要素,那么“Cypress”就自动进入回轨模式,直到具备这一要素或有时间外出。


cy.get( #txt )
   .then((e) => { //proceed working on element })

这种方法产生了灵敏。 此外,只有在网站内容与定位器相匹配的情况下,才能解决投标问题。 如果诉讼处于拒绝状态,则从不执行那部分的逻辑。

我们可以在Cypress获得 j,表达如下:


Cypress.$(  #txt ), where #txt is the locator.

Implementation of jQuery methods

下面是发现和实施“ j”气旋风暴试验的指令。


// test suite
describe( Tutorialspoint , function () {
// it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com")
      // access web element with Cypress.$
      cy.request( / ).get( h1#headingText ).then(function(e){
         Cypress.$(e).find( span )
         const t = e.text()
         cy.log(t)
      })
   })
})

随着上述测试的进行,如果我们打开了哥索尔(压缩F12),并找到必要的网络要素,加上“Cypress.$”(h1#headingText ).text(),我们可以核实我们的测试,如下所示:

Implementation of jQuery Methods

日志信息——信号——来自Cypress的cy。

Cypress - Checkbox

突击检查和检查用于检查箱。 在《html法典》中,一个检查箱有输入标签,其类型属性作为检查箱具有价值。

Cypress Commands

监查箱相关气压指令如下:

    用于点平所有检查箱的指挥 如下:


cy.get( input[type="checkbox"] ).check()

    指挥系统用于cpcka aeck Box with ideck 如下:


cy.get( #chk ).check()

    指挥用于cpck aeck Box with Value Cypress 如下:


cy.get( input[type="checkbox"] ).check( Cypress )

    用于cpck 带有价值——Java和<>/b>的检查箱的指挥如下:


cy.get( input[type="checkbox"] ).check([ Java , Python ])

    用于cpcks 支票箱,用选项对 Java进行估价。 如下:


cy.get( .chk ).check( Java , options)

    指挥部用于 点击带有价值—— Java和含有选择的 Python箱”。 具体如下:


cy.get( input[type="checkbox"] ).check([ Java , Python ], options)

    用于cpck的检查箱中,有选择的检查组如下:


cy.get( .chk ).check({force : true})

    用于uncheck所有检查箱的指挥 如下:


cy.get( input[type="checkbox"] ).uncheck()

    用于uncheck 检查箱的贴现检查。 如下:


cy.get( #chk ).uncheck()

    用于uncheck 带有价值Cypress的检查箱 如下:


cy.get( input[type="checkbox"] ).uncheck( Cypress )

    用于uncheck带有价值——Java和的检查箱的指挥如下:


cy.get( input[type="checkbox"] ).uncheck([ Java , Python ])

    用于控制具有价值 Java的检查箱的指挥部有以下选择:


cy.get( .chk ).uncheck( Java , options)

    用于uncheck带有价值——Java和的检查箱的指挥办法如下:


cy.get( input[type="checkbox"] ).uncheck([ Java , Python ], options)

    用于uncheck的检查箱中,有选择的检查组如下:


cy.get( .chk ).uncheck({force : true)

Options in Cypress

热带风暴中的备选办法如下:

    log - Default Value - real 这被用于处理/清除 con。

    timeout - Default Value - BackCommandtimeout(4000ms) - 这是为了在出现错误之前提供最长的等待时间。

    force - Default Value - mis 这被用于执行一项行动。

    scrollBehaviour – Default value – scrollBehaviour(top) − This is for the position of viewport up to which element to be scrolled prior command execution.

    waitForAnimations - Default Value -等到ForAnimations(true) 这被用于等待部队在指挥之前完成消.。

    animationDistanceThreshold - Default value – animationDistanceThreshold (5) − This is for the pixel distance of an element that should be exceeded to quapfy for animation.

检查/检查指挥都要求与指挥系统挂钩,这些指挥部门可采用DOM分子和说法。

Implementation of Cypress Commands

The implementation of the directs in Cypress is below -


// test suite
describe( Tutorialspoint , function () {
   // it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://accounts.google.com/signup")
      //checkbox with assertion
      cy.get( input[type="checkbox"] ).check().should( be.checked )
      //identify checkbox with class with assertion
      cy.get( .VfPpkd-muHVFf-bMcfAe ).uncheck().should( not.be.checked )
   })
})

产出如下:

Implementation of Cypress Commands

上述结果显示,显示密码左边的检查箱,先与检查指挥部核对(经证实)。

然后,它不受检查指挥的束缚(也经确认书)。

Cypress - Tabs

气旋风暴没有具体指挥与制片合作。 它在酒吧有工作方式,通过这种方法处理表格。 在《html法典》中,由于属性目标,连接点或纽州打开了新表格。

如果目标属性有价值空白,它就会打开新的表格。 风暴使用“ j”法,取而代之。 删除后删除了作为援引方法参数之一的属性。

一旦目标空白被拆除,则在母窗上打开连接/布道。 其后,在开展行动后,我们可以向上级卢爱拉转移指挥权。

同样的Html法典如下:

Tabs

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 tab url
      cy.url()
      .should( include ,  https://the-internet.herokuapp.com/windows/new )
      // shift to parent window
     cy.go( back );
   });
});

产出如下:

Implementation

产出记录显示删除了目标属性,并在母窗内推出新的表格。

Cypress - Dropdown

指挥选择用来进行静态下降。 在《html法典》中,降幅有选择的标签,而减小部分则由选择标签代表。

Dropdown Cypress Commands

与气球有关的降水指挥如下:

    用于选择选项>的指挥系统 如下:


cy.get( select ).select( Cypress )

    选择Tutorialspoint和Java的指挥如下:


cy.get( select ).select([ Tutorialspoint ,  JavaScript ])

    可选择降级办法的价值的指挥,以及选择(修改缺省特性) 如下:


cy.get( select ).select( option1 , options )

    选择的多面值和选择的指挥 如下:


cy.get( select ).select([ option1 ,  option2 ], options)

Options for dropdown in Cypress

热带风暴降幅的备选办法如下:

    log - Default Value - real- 这被用于处理/抵消ole木。

    timeout – Default value – defaultCommandTimeout(4000)− This is used to provide the maximum wait time for the selection prior to throwing an error.

    force - Default Value - mis- 这被用于执行一项行动。

可在Cypress的选定指挥中应用污染物。

让我们尝试从《html法典》中价值为99的下降中选择India

Dropdown Cypress Commands

Implementation

下面对印度热带风暴中选择印度选项的下级指挥的执行情况作出解释。


// test suite
describe( Tutorialspoint , function () {
   // it function to identify test
   it( Scenario 1 , function (){
      // test step to launch a URL
      cy.visit("https://register.rediff.com/register/register.php")
      //select option India with value then verify with assertion
      cy.get( select[id="country"] ).select( 99 ).should( have.value ,  99 )
   })
})

产出如下:

Dropdown Commands

The output shows that the Country dropdown selects the option India (in the html code, this option is identified with the value as 99).

Cypress - Alerts

气球可以不停地发出警报。 人群可以是警戒或确认的人群。 气球的设计方式是,它总是在波堤上点击。 此外,Cypress还能够焚烧浏览器。

window:alert event触发警报。 这是因为Cypress和Kutton在警示中被点击,而在处决期间没有发现。

然而,执行记录将显示警报的存在。

Implementation Alerts

The implementation of press in Cypress is given below -


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch url
      cy.visit("https://register.rediff.com/register/register.php");
      // cpck submit
      cy.get( input[type="submit"] ).cpck();
   });
});

产出如下:

Cypress Execution Logs

警示信息在Cypress执行记录上显示。

风暴能够利用电线发射窗户:惯性事件。 然后,我们可以核实警示文本。

然而,这一事件应在后端发生,在执行期间不会出现。

Implementation Alert text verification

下面是“Cypress”预警文本核查的执行情况。


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch url
      cy.visit("https://register.rediff.com/register/register.php");
      // cpck submit
      cy.get( input[type="submit"] ).cpck();
      // fire event with method on
      cy.on( window:alert ,(t)=>{
         //assertions
         expect(t).to.contains( Your full name );
      })
   });
});

产出如下:

Implementation Alert Text Verification

产出记录显示,通过Cypress发射警报活动,对警报文本进行了成功核查。

在确认栏目中,启动了浏览器活动窗口:水泥。 象警钟一样,Cypress可以用在Khton的手法,用手法,在 default上点击。

让我们看一下以下例子。 在这里,在点击Cpck用于Jon Confirmutton时,展示了一个确认波。

JavaScript Alerts

以下确认与OKCancel但已展示。

JS Confirm.jpg

在点击Kutton时,展示如下:


You cpcked: Ok

展示像以下图象:

JS Alerts.jpg

点击Cancel,但如下所示:


You cpcked: Cancel

展示像以下图象:

JS Cancel

Implementation Confirmation verification

下面是证实“旋风”警报的实施工作。


describe( Tutorialspoint Test , function () {
   // test case
   it("Scenario 1", function () {
      //URL launched
      cy.visit("https://the-internet.herokuapp.com/javascript_alerts")
      //fire confirm browser event and accept
      cy.get( :nth-child(2) > button ).cpck()
      cy.on("window:confirm", (t) => {
         //verify text on pop-up
         expect(t).to.equal("I am a JS Confirm");
      });
   });
});

产出如下:

Implementation Confirmation Verification

Implementation Confirmation verification

下面是证实“旋风”警报的实施工作。


describe( Tutorialspoint Test , function () {
   // test case
   it("Scenario 1", function () {
      //URL launched
      cy.visit("https://the-internet.herokuapp.com/javascript_alerts")
      //fire confirm browser event and accept
      cy.get( :nth-child(2) > button ).cpck()
      cy.on("window:confirm", (t) => {
         //verify text on pop-up
         expect(t).to.equal("I am a JS Confirm");
      });
   });
});

产出如下:

Cpcked Ok

产出记录显示,通过Cypress发射确认书,成功核查了确认书。

Implementation Cancel cpck

在“Cypress”中点击“确认”的注销情况如下:


describe( Tutorialspoint Test , function () {
   // test case
   it("Scenario 1", function () {
      // URL launched
      cy.visit("https://the-internet.herokuapp.com/javascript_alerts")
      //fire confirm browser event
      cy.on("window:confirm", (s) => {
         return false;
      });
      // cpck on Cpck for JS Confirm button
      cy.get( :nth-child(2) > button ).cpck()
      // verify apppcation message on Cancel button cpck
      cy.get( #result ).should( have.text ,  You cpcked: Cancel )
   });
});

产出如下:

Implementation Cancel Cpck

产出记录显示,成功核查了被点击的你:Cancel文本,该文本是在确认时点击Cancel hton的。

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

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 - Hidden Elements

风暴能够处理隐藏的元素。 有时,子宫只被 h在主菜.上。 这些子动物最初被隐藏在Cascading上型谢物(CSS)上:无。

在处理隐蔽元素时,Cypress利用 j法显示的帮助。 必须在Cypress指挥部的帮助下援引。

例如, on hovering over the Sign in menu, the Sign in button gets displayed, as shown below −

Sign in

On在把 mo子从 Sign子中搬出时, Sign子的签字被隐藏起来,如下所示。

Sign in Menu

Implementation

采用“ j show”法的隐藏元素如下:


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch URL
      cy.visit("https://www.amazon.com/");
      // show hidden element with invoke
      cy.get( #nav-flyout-ya-signin ).invoke( show );
      //cpck hidden element
      cy.contains( Sign ).cpck();
   });
});

产出如下:

jQuery show

describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch URL
      cy.visit("https://www.amazon.com/");
      // show hidden element with invoke
      cy.get( #nav-flyout-ya-signin ).invoke( show );
      //cpck hidden element
      cy.contains( Sign ).cpck();
   });
});

Execution Results

产出如下:

Hidden Elements with jQuery

执行记录显示由icon代表的隐藏要素是步骤的权利。

热带风暴具有另一种处理隐蔽元素的技术。

例如, to cpck a hidden element we can use the Cypress command cpck and pass the option {force : true} as a parameter to it - cpck({ force: true }).

这改变了隐藏元素的隐蔽特征,我们可以点击。

Implementation with cpck

下面是用点击在Cypress实施。


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch URL
      cy.visit("https://www.amazon.com/");
      //cpck hidden element
      cy.contains( Sign ).cpck({force:true});
   });
});

产出如下:

Implementation with Cpck

处决记录显示被点击的隐性元素(Sign in),我们被浏览到下页。

Cypress - Frames

较早的气旋风暴无法进入内层。 但是,最近的版本有框架解决办法。

为了配合框架,首先,我们必须安装一个带有以下指挥力的风暴潮——


npm install –D cypress-iframe

播放的屏幕如下:

Cypress Plugin

为了在Cypress实施框架,我们必须在守则中添加以下声明:import cypressiframe 。 标称“框架/框架”用于代表《html法典》中的框架。

以下屏幕将登在你的电脑上:

Cypress Iframe

气压指挥系统载荷被用来将重点从主页移至框架。 一旦重点转移,我们就能够与框架中的内容互动。

这种方法采用的是机体法。

Implementation

下面是采用环形仪法,对框架进行气旋风暴指挥。


import  cypress-iframe 
describe( Tutorialspoint Test , function () {
   // test case
   it( Test Case6 , function (){
      // launch URL
      cy.visit("https://jqueryui.com/draggable/");
      // frame loading
      cy.frameLoaded( .demo-frame );
      //shifting focus
      cy.iframe().find("#draggable").then(function(t){
         const frmtxt = t.text()
         //assertion to verify text
         expect(frmtxt).to.contains( Drag me around );
         cy.log(frmtxt);
      })
   });
});

产出如下:

Draggable

执行记录显示,在框架范围内有出入要素,案文在框架中被放弃。

气压无法在一页内处理一个以上的框架。

Also, for frame Intelpsense to Cypress, we can add /// <reference types = "Cypressiframe"/> to the code.

Cypress - Web Tables

风暴能够处理网页。 表格基本上分为两类:动态和静态。 固定表格的栏目和行数与动态表格不同。

在《html法典》中,表格以表格标语表示,而浏览则以斜线表示,栏目按斜线表示。

    为了进入各行,Cypress指挥系统如下:


 cy.get("tr")

    为进入各栏,Cypress指挥系统如下:


 cy.get("td") or cy.get("tr td")

    查阅一栏,特别安全局的表述如下:


td:nth-child(column number)

    To iterate through the rows/columns of the table, the Cypress command each is used.

在“旋风”中,我们有“指挥”next,排在紧接下。 这一指挥必须经过指挥。 突击队被用来转移到前面的兄弟姐妹。

下表的Html结构如下:

Html Structure

Example

让我们以表格为例,并核实第二栏(Open Source)中与价值 Sel相对应的内容,该栏是同OL联系的第一栏。

以下屏幕将登在你的电脑上:

Automation Tool

Implementation

下面是实施与表格有关的气旋风暴指挥系统:


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      //URL launch
      cy.visit("https://sqengineer.com/practice-sites/practice-tables-selenium/")
      // identify first column
      cy.get( #table1> tbody > tr > td:nth-child(1) ).each(($elm, index, $pst)=> {
         // text captured from column1
         const t = $elm.text();
         // matching criteria
         if (t.includes( Selenium )){
            // next sibpng captured
            cy.get( #table1 > tbody > tr > td:nth-child(1) )
            .eq(index).next().then(function(d) {
               // text of following sibpng
               const r = d.text()
               //assertion
               expect(r).to.contains( Commercial );
            })
         }
      })
   });
});

产出如下:

Practice Tables

执行记录显示,第1栏所列数值为公开来源。 这是因为紧随同一行的Selenium(第一栏)的精干。

Cypress - Mouse Actions

风暴可以处理隐藏的元素。 有时,子午餐只在主菜的 h上展示。 这些分母最初被藏在CSS财产显示:none。

在处理隐蔽元素时,Cypress利用 j法显示的帮助。 必须在Cypress指挥部的帮助下援引。

例如, on hovering over the Mouse Hover button, the Top and Reload buttons get displayed, as shown below −

Mouse Hover

在将烟 mo从Mouse Hoverutton移出时,上下游和重载纽托藏起来,如下文所示:

Mouse Hover Button

Implementation with jQuery show method

下面是用 j球显示法实施。


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch URL
      cy.visit("https://learn.letskodeit.com/p/practice");
      // show hidden element with invoke
      cy.get( span.mouse-hover-content ).invoke( show );
      //cpck hidden element
      cy.contains( Top ).cpck();
   });
});

产出如下:

Implementation with jQuery show method

执行记录显示隐藏的元素——托托纽托,由一行代表。

Cypress - Cookies

Cypress处理方法Cookies.pstenOnce()和Cookies.defaults()。 这种方法Cookies.debug()在 co发生任何变化时,可生成对 con的标识。

否则,“Cypress”在每次试验执行之前会拆除所有 co。 我们可以利用Cypress.Cookies.p reservesOnce()保存其姓名的 co,以供其他测试使用。

Syntax

The syntax for the authorities related to the cookies in Cypress are as follows -

如果 co基价值被配置或清除,这将产生ole木。


Cypress.Cookies.debug(enable, option)

这里

    • 如果能够减少厨师的.。

    选择——没收 co的违约值,例如保存 co。


Cypress.Cookies.debug(true) // logs will generate if cookies are modified
cy.clearCookie( cookie1 )
cy.setCookie( cookie2 ,  val )

减少伐木量。


Cypress.Cookies.debug(true, { verbose: false })
Cypress.Cookies.debug(false) // logs will not generate if cookies are modified

以下的辛迪加将保护 co,在进行另一次试验之前不会予以清除。


Cypress.Cookies.preserveOnce(cookie names...)

这一辛迪加用于改变全球组合,并维持一组用于测试的 co。 任何修改都将适用于这一特定测试(仍保留在cy/支持/指数档案中,并在测试执行之前装上)。


Cypress.Cookies.defaults(option)
Cypress.Cookies.defaults({
   preserve:  cookie1 
})

这里 the cookie named cookie1 will not be cleared before running the test.

Cookie Methods

热带风暴中的一些ok基方法如下:

    cy.clearCookies() − It removes all the cookies from present domain and subdomain.

    cy.clearCookie(姓名) 它用名称将 co子从浏览器中删除。

    cy.getCookie(姓名)- 它用名称从浏览器处获得 co。

    cy.getCookies() - 它用于获取所有 co。

    cy.setCookie(姓名)- 它可以召集一个厨师。

Implementation

下面是“Cypress”中的 co基方法的实施。


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch the apppcation
      cy.visit("https://accounts.google.com");
      // enable cookie logging
      Cypress.Cookies.debug(true)
      //set cookie
      cy.setCookie( cookie1 ,  value1 )
      //get cookie by name and verify value
      cy.getCookie( cookie1 ).should( have.property ,  value ,  value1 )
      //clear cookie by name
      cy.clearCookie( cookie )
      //get all cookies
      cy.getCookies()
      //clear all cookies
      cy.clearCookies()
      //verify no cookies
      cy.getCookies().should( be.empty )
   });
});

产出如下:

Cypress - Get and Post

“Get”和“邮政”方法是“应用规划接口”测试的一部分,可由“Cypress”进行。

Get Method

为了开展“公平行动”,我们将以cy.request()提出“吉大港”申请,并将“Get”和“URL”作为这种方法的参数。

如果请求得到接受和正确处理,地位法就反映了这一点。 法典第200(means ok)和201(means 创建)。

Implementation of Get

The implementation of Get methods in Cypress is below -


describe("Get Method", function(){
   it("Scenario 2", function(){
      cy.request("GET", "https://jsonplaceholder.cypress.io/comments", {
      }).then((r) => {
         expect(r.status).to.eq(200)
         expect(r).to.have.property( headers )
         expect(r).to.have.property( duration )
      });
   })
})

产出如下:

Get Method

Post Method

While using the Post method, we are actually sending information. If we have a group of entities, we can append new ones at the end, with the help of Post.

To perform a Post operation, we shall make a HTTP request with the cy.request() and pass the method Post and URL as parameters to that method.

Implementation of Post

下面是“旋风”中采用邮政方法。


describe("Post Method", function(){
   it("Scenario 3", function(){
      cy.request( https://jsonplaceholder.cypress.io/users?_pmit=1 )
      .its( body.0 ) // yields the first element of the returned pst
      // make a new post on behalf of the user
      cy.request( POST ,  https://jsonplaceholder.cypress.io/posts , {
         title:  Cypress ,
         body:  Automation Tool ,
      })
   })
});

产出如下:

Cypress - File Upload

To perform file upload task in Cypress, we have to first install a plugin with the command mentioned below −


   npm install –dev cypress-file-upload

以下屏幕将登在你的电脑上:

Upload Task in Cypress

一旦安装完毕,我们就必须在指挥部档案中增加进口气压单上载荷。 这一档案存放在我们“Cypress”项目内。

此外,我们将补充我们想要在固定装置夹中上载的文件(Picture.png文档)。 将展示以下屏幕:

Picture.png file

为了上载档案,我们必须使用Cypress指挥系统,并附上File,并将文档作为参数上载。

Implementation

用于在Cypress上载一个档案的指挥系统如下:


describe( Tutorialspoint Test , function () {
   // test case
   it( Test Case6 , function (){
      //file to be uploaded path in project folder
      const p =  Picture.png 
      // launch URL
      cy.visit("https://the-internet.herokuapp.com/upload")
      //upload file with attachFile
      cy.get( #file-upload ).attachFile(p)
      //cpck on upload
      cy.get( #file-submit ).cpck()
      //verify uploaded file
      cy.get( #uploaded-files ).contains( Picture )
   });
});

产出如下:

Uploading a File in Cypress

执行记录显示档案照片。 png got上载,文档名称反映在网页上。

Cypress - Data Driven Testing

在固定装置的帮助下,进行了风化数据驱动测试。 添加气压装置,以保持和掌握自动化测试数据。

固定装置在Cypress项目夹(Example.json文档)内。 基本上,它帮助我们从外部档案中获得数据投入。

Fixtures

气压固定装置的夹可在 Java本末端(JSON)或其他格式有文档,数据以“钥匙:价值”为平。

所有测试数据都可以通过一次以上的测试加以利用。 所有固定装置数据必须在前栏目中公布。

Syntax

The syntax for Cypress data Drive test is as follows -


cy.fixture(path of test data)
cy.fixture(path of test data, encoding type)
cy.fixture(path of test data, opts)
cy.fixture(path of test data, encoding type, options)

这里

    编码类型——编码类型(tf-8, asci,等等)用于读文档。

    Opts − Modifies the timeout for response. The default value is 30000ms. The wait time for cy.fixture(), prior throws an exception.

Implementation in example.json

下面是采用数据驱动测试。 json in Cypress -


{
   "email": "abctest@gmail.com",
   "password": "Test@123"
}

Implementation of Actual Test

在Cypress实施实际数据驱动测试如下:


describe( Tutorialspoint Test , function () {
   //part of before hook
   before(function(){
      //access fixture data
      cy.fixture( example ).then(function(signInData){
         this.signInData = signInData
      })
   })
   // test case
   it( Test Case1 , function (){
      // launch URL
      cy.visit("https://www.pnkedin.com/")
      //data driven from fixture
      cy.get( #session_key  )
      .type(this.signInData.email)
      cy.get( # session_password ).type(this.signInData.password)
   });
});

产出如下:

Implementation of Actual Test

产出记录显示,将分送电子邮件和密码田的数值分别为abctest@gmail.com和 Test@123。 这些数据已经通过固定装置进行测试。

Cypress - Prompt Pop-up Window

风暴可以处理迅速的流行窗口,用户可以输入这些窗口的价值。 即时有一个案文领域,即提供投入。 为了处理迅速流行的风.,采用了风云(cy)方法。

它获得迅速标的(翻新窗口)的价值。 在确认/证明人满为患时,我们必须发动一场浏览器活动。 但是,为了迅速普及,我们必须使用cy(cy)方法。

Example

让我们看一下以下例子,在点击Cpck for JS Prompt button时,如以下所示,出现了迅速的登峰。

Cpck for JS Prompt

下面与用户投入领域一起展示。 如下文所示,图西人点迅速进入人口。

Prompt Pop-Up

你们进入——图兰点是在下台展示的。

可见于下列屏幕上:

Entered Result

Implementation

下面是关于在Cypress——展示迅速流行窗口的指挥系统。


describe( Tutorialspoint Test , function () {
   // test case
   it("Scenario 1", function () {
      //URL launch
      cy.visit("https://the-internet.herokuapp.com/javascript_alerts")
      //handpng prompt alert
      cy.window().then(function(p){
         //stubbing prompt window
         cy.stub(p, "prompt").returns("Tutorialspoint");
         // cpck on Cpck for JS Prompt button
         cy.get( :nth-child(3) > button ).cpck()
         // verify apppcation message on cpcking on OK
         cy.get( #result ).contains( You entered: Tutorialspoint )
      });
   });
});   

产出如下:

Implementation of the Commands

产出记录显示了对案文的成功核查。

You enteredTutorialspoint, is produced on cpcking OK button on prompt pop up. Also, the stub appped on the prompt window is visible on the output log.

Cypress - Dashboards

Cypress Dashpad 必须建立这种服务,以便在我们的系统中进行的Cypress检测与云层上的仪表板之间建立联系。

Features

The characteristics of Cypress Dashpad

    报告提供了经过、失败和熟练测试案例总数的数据。

    对失败测试的分辨率和屏幕可查。

    试验执行录像可以提供。

    测试数据、框架及其利用的管理是可能的。

    提供了该组织的使用趋势。

Setup Cypress Dashboard

为了建立这一进程,首先,我们应当去“声望”试金窗的“龙像”。 然后点击连接达什板。 以下屏幕将显示:

Setup Cypress Dashboard

如下文所示,我们将在达什板上获得各种伐木选择:

Logging on to the Dashboard

在成功签署之后,我们将获得成功的信息。 继续。

Login Successful

输入项目名称、所有人和用户,他们可以看到该项目。

接着,点击了立楼项目。

Setup Project

然后,Cypress应提出以下建议:

    Id

    独特的项目关键(指挥形式将在终端执行)

Cypress Suggestion

该项目 从“Cypress”建议获得的Id应当与“电压”中的现有项目匹配。 json file within the Project /61/3er.

ProjectId

其次,我们必须按照“Cypress”的建议,行使以下所述指挥权:


node_modules/cypress/bin/cypress run --record --key <project key>

下面的屏幕显示:

Screen

一旦执行,我们就必须开放试验航标表。 它拥有平台、浏览器和测验时间方面的信息。

试验记录应可见。 页: 1

Test Records

如下文所示,记录以浏览器开启,测试结果概述(计算结果、失败、等待、熟练程度)。

Test Result Overview

在表象中,我们应了解每次测试的细节及其结果。

此外,还有一些特征,如产出、试样、录像等等。

Failed Test Screenshot

Cypress - Screenshots and Videos

风暴可以在屏幕和视频上进行。 首先,让我们理解“旋风”如何能够帮助掌握屏幕。

Screenshots

我们既能抓住整页,又能用“旋风”中的屏幕照相。

除此以外,“旋风”还具有内在特征,可捕捉测试失败的屏幕。 为了掌握一个特定情景的屏幕,我们使用了指挥屏幕。

Screenshot Implementation

在Cypress实施屏幕示意图如下:


describe( Tutorialspoint Test , function () {
   // test case
   it("Scenario 1", function () {
      //URL launched
      cy.visit("https://the-internet.herokuapp.com/javascript_alerts")
      //complete page screenshot with filename - CompletePage
      cy.screenshot( CompletePage )
      //screenshot of particular element
      cy.get( :nth-child(2) > button ).screenshot()
   });
});

产出如下:

Cpck for JS Confirm

执行记录显示,收集了完整的页面屏幕(档案名称为完整分类.png),并放映了某一特定内容(JS Confirm)。

These screenshots got captured inside the screenshots folder (in the plugins folder) within the project. The location where the screenshots got captured, can be modified by changing the Global configurations.

完整的Page.png文档为全页图像制作。

CompletePage.png

收集了JS Confirm的Thton Cpck的屏幕。

Screenshot of the Button

在“测试航道”栏中,参数屏幕对RunFailure设定了违约的真正价值。 由于这些原因,总是为失败测试而摄取屏幕。

此外,屏幕灯光灯光灯参数具有光压/透镜的价值。 因此,屏幕显示器在屏幕上进行。

Screenshots Folder Parameter

为了掌握不成功的屏幕,我们必须在电压中增加以下数值。 json file -


Cypress.Screenshot.defaults({
   screenshotOnRunFailure: false
})

Videos

录像带的“Cypress”通过测试进行。 这些材料储存在项目内的录像带上。

一俟气旋风暴测试与以下所述指挥进行:


node_modules/.bin/cypress run

我们获得奥塞罗语以及录像、压缩细节的位置,等等。

Location of the Video

我们在该项目的同一地点获得相应的录像。

Video Capture Feature

为了消除录像带,我们必须在电压中增加以下价值。 json file -


{
   "video": false
}

Cypress - Debugging

风暴具有非常好的破坏特征,我们在那里能够花时间,看到试验执行期间实际发生的情况。 可以通过将 mo压在试验航标上来进行。

随着我们走到试验车窗上的步骤,这些要素得到了强调。 我们还可以使用“旋风”指挥。 这预示了执行,在此期间,我们可以推翻先前的步骤。 之后,我们可以再次恢复执行。

Implementation

用于在Cypress进行脱硫的指挥如下:


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch the apppcation
      cy.visit("https://accounts.google.com");
      // enable cookie logging
      Cypress.Cookies.debug(true)
      cy.getCookies
      //pause execution
      cy.pause()
      cy.setCookie( cookie1 ,  value1  )
   });
});

产出如下:

Debugging

产出记录显示,处决已经暂停(由Pauseshton代理)。 然后,我们再一次通过点击恢复纽顿(在帕塞德纽特州旁边)去除先前的步骤之后再恢复。

Cpcking the Resume Button

产出日志现在在停产后执行的所有步骤。

如果我们在浏览器上打开了开发商Console(压缩F12),并从测试仪中选择一个步骤,Console应显示所使用的指挥和估价的Yelded。

例如, for the setCookie step, the Console shows Command − setCookie and Yielded shows the cookie name − cookie1 and value − value1.

SetCookie

Cypress - Custom Commands

用户描述的是气压习惯,而不是Cypress的默认指挥。 这些定制的指挥系统被用来制造自动流动中重复的测试步骤。

我们可以补充并超越已经存在的指挥。 他们应被置于指挥部。 j 在“Cypress”项目支助组内存档。

Cypress Project Command

Syntax

The syntax for thetomtors in Cypress is as follows -


Cypress.Commands.add(function-name, func)

Cypress.Commands.add(function-name, opts, func)

Cypress.Commands.overwrite(function-name, func)

这里

    func> 是经过辩论才掌握的职能。

    用来描述习惯指挥的含蓄特性。 它还用于确定如何处理以前产生的主题(只适用于Cypress.Commands.add())和选择的违约价值。 选择预先接受false,以忽视先前的主题,接受先前的主题,并接受optional,以开始链条或利用原有链条。 一种选择是接受扼杀、阵列或诱杀。

Implementation of custom command

下面是commands.js实施海关指令。


Cypress.Commands.add("userInput", (searchTxt) => {
   //to input search text in Google and perform search
   cy.get("input[type= text ]").type(searchTxt);
   cy.contains("Google Search").cpck();
});

Implementation of Actual Test

下面是按习俗指挥对Cypress进行实际测试的情况。


describe( Tutorialspoint Test , function () {
   // test case
   it( Test Case 6 , function (){
      // launch the apppcation
      cy.visit("https://www.google.com/");
      //custom parent command
      cy.userInput( Java )
   });
});

产出如下:

Implementation of Actual Testing

产出记录显示,习惯指挥——用户投入(行为、类型和点击指挥)已经执行。

建议海关指挥不应太长。 这应当是简短的,因为,在习惯指挥中增加太多的行动往往表明处决。

Cypress - Fixtures

添加气压装置,以保持和掌握自动化测试数据。 固定装置在Cypress项目夹(Example.json文档)内。 基本上,它帮助我们从外部档案中获得数据投入。

Features

气压固定装置的夹可有JSON或其他格式的文档,数据则以“钥匙:价值”制成。

所有测试数据都可以通过一次以上的测试加以利用。 所有固定装置数据必须在前栏目中公布。

Syntax

The syntax for Cypress data Drive test is as follows -


cy.fixture(path of test data)
cy.fixture(path of test data, encoding type)
cy.fixture(path of test data, opts)
cy.fixture(path of test data, encoding type, options)

这里

    编码类型——编码类型(tf-8, asci,等等)用于读文档。

    Opts − Modifies the timeout for response. The default value is 30000ms. The wait time for cy.fixture(), prior throws an exception.

Implementation in example.json

下面是用example.json在Cypress进行数据驱动检测。


{
   "fullName": "Robert",
   "number": "789456123"
}

Implementation of Actual Test

在Cypress实施实际数据驱动测试如下:


describe( Tutorialspoint Test , function () {
   //part of before hook
   before(function(){
      //access fixture data
      cy.fixture( example ).then(function(regdata){
         this.regdata=regdata
      })
   })
   // test case
   it( Test Case1 , function (){
      // launch URL
      cy.visit("https://register.rediff.com/register/register.php")
      //data driven from fixture
      cy.get( :nth-child(3) > [width="185"] > input )
      .type(this.regdata.fullName)
      cy.get( #mobno ).type(this.regdata.number)
   });
});

产出如下:

Data Driven Testing in Cypress

产出记录显示,将罗伯特和789456123的数值分别输入全称和移动区。 这些数据已经通过固定装置进行测试。

Cypress - Environment Variables

我们可以确定可在全球范围内宣布用于测试自动化框架的环境变量,而且所有测试案例都可以查阅。 这种定制的环境变量可以储存在电压中。 json file within the project.

Cypress JSON

由于Cypress的缺省组合没有暴露出定制变量,我们必须提及电压中的关键是“evn”。 json案,然后确定价值。

此外,为了在实际测试中获取这一变量,我们必须使用Cypress.env,并传递在json档案中宣布的价值。

Implementation in cypress.json

环形中环境变量的指令的实施。 json格式如下:


{
   "projectId": "fvbpxy",
   "env" :
   {
      "url" : "https://www.google.com/"
   }
}

Implementation of Actual Test

气候压力中环境变量的实际试验如下:


describe( Tutorialspoint Test , function () {
   // test case
   it( Scenario 1 , function (){
      // launch apppcation from environment variable
      cy.visit(Cypress.env( url ))
      cy.getCookies()
      cy.setCookie( cookie1 ,  value1 )
   });
});

产出如下:

Output Logs

产出记录显示,启动的URL是一种定制的环境变数。 json案。

Configure Environment Variables

We can configure or modify the environment values from the command pne with the flag --env.

To run a particular file (for example: Test1.js) with URL: https://accounts.google.com in a headed mode, the command shall be as follows:


./node_modules/.bin/cypress run --spec cypress/integration/examples/Test1.js --
env url=https://accounts.google.com –headed

如果我们对环状中环境变量的定值。 json文档不同于指挥线设定的价值,Cypress应优先使用指挥线设定的价值。

Cypress - Hooks

台风Hooks用于在每次/每次检测之前进行某些操作。 其中一些共同点如下:

    before − It is executed, once the prior execution of any tests within a describe block is carried out.

    after − It is executed, once the post execution of all the tests within a describe block is carried out.

    beforeEach − It is executed prior to the execution of an inspanidual, it blocks within a describe block.

    afterEach − It is executed post execution of the inspanidual, it blocks within a describe block.

Implementation

The implementation of directs for the Cypress Hooks is below -


describe( Tutorialspoint , function() {
   before(function() {
      // executes once prior all tests in it block
      cy.log("Before hook")
   })
   after(function() {
      // executes once post all tests in it block
      cy.log("After hook")
   })
   beforeEach(function() {
      // executes prior each test within it block
      cy.log("BeforeEach hook")
   })
   afterEach(function() {
      // executes post each test within it block
      cy.log("AfterEac hook")
   })
   it( First Test , function() {
      cy.log("First Test")
   })
   it( Second Test , function() {
      cy.log("Second Test")
   })
})

产出如下:

Cypress Hooks

产出记录显示,第一个执行步骤是“一切照旧”。

最后一个执行步骤是AFTER ALL。 两人只住过一次。

在“EACH”下执行的措施有两次(每次“TEST BODY”之前)。

此外,根据AFTER EACH执行的两步行动(在每一技术设备之后)。

两个区块均按执行顺序执行。

TAG

除hoo外,Cypress还有tag子——只有和.skip。

虽然只有tag子被利用去执行它被拖到的路障,但情况并非如此。 ski门被利用,排除了被拖到哪块。

Implementation with .only

The implementation of . only tag in Cypress is as follows -


describe( Tutorialspoint , function()
   //it block with tag .only
   it.only( First Test , function() {
      cy.log("First Test")
   })
   //it block with tag .only
   It.only( Second Test , function() {
      cy.log("Second Test")
   })
   it( Third Test , function() {
      cy.log("Third Test")
   })
})

产出如下:

Cypress Has Tags

产出记录显示,只有标的区块(第一次和第二次试验)只有行标。

Implementation with .skip

The implementation of .skip tag in Cypress is as follows -


describe( Tutorialspoint , function()
   it( First Test , function() {
      cy.log("First Test")
   })
   it( Second Test , function() {
      cy.log("Second Test")
   })
   //it block with tag .skip
   it.skip( Third Test , function() {
      cy.log("Third Test")
   })
})

产出如下:

Cypress Skip Tags

产出记录显示,与ski子的 block块(第三次测试)从执行中跳出。

Cypress - Configuration of JSON File

气压组合包括一些关键价值乳制品,适用于框架范围内的所有试验。 气管缺省配置可在“灯塔”栏下提供; 在“测试天窗”中进行配置(扩大)。

Cypress Automation

如果我们在同一窗口中进一步缩小,我们将拥有像时间外差、环境变数、翻路等多种组合的现有价值。

如下所示:

JavaScript Object Notation

如果我们在同一窗口中进一步缩小,我们将拥有像时间外差、环境变数、翻路等多种组合的现有价值。

如下所示:

Few more Configurations JavaScript Object Notation

Override Default values

2. 超越气压中的缺省组合。 json案卷,我们必须具体说明关键价值乳制品。

Override Default values

Implementation in cypress.json

如下:


{
   "baseUrl" : "https://www.google.com/"
}

这里 the key is baseUrl and the value is https://www.google.com/. Once the tests are run again, the changes are reflected in the global configurations, as shown below −

Global Configurations

Implementation of Actual Test

对个人档案中压倒性违约价值的实际检验如下:


describe( Tutorialspoint , function () {
// test case
   it( First Test , function (){
      // launch apppcation from configuration
      cy.visit("/")
   });
});

产出如下:

BaseUrl

执行记录显示,基乌拉是从气压中获取的。 json文档,适用于框架范围内的所有测试。

Override Default configurations

我们可以超越测试稿中的缺省组合,这些文字在试验案例中适用于单个测试步骤,而不是适用于完整的框架。

这一工作是在Cypress的混凝土指挥部的帮助下进行的。

例如, if we want to increase the default timeout for a particular test step, implementation shall be as follows −


//set default time out to nine seconds from following steps in test
Cypress.config( defaultCommandTimeout ,9000)
landPage.selectUser().cpck()

同时,如果默认的通勤值被定为电压中的七秒钟。 json file, 然后Cypress应优先使用试验步骤(即9秒)所用的时间。

最后,它优先考虑的是缺省组合。

Disable Overriding Default configurations

我们可以否认这一特点,即把拖欠的组合从气压中抹掉。

环形组合。 json如下:


{
   "defaultCommandTimeout" : "9000"
}

为了消除上述配置,指挥系统如下:


npx cypress open --config-file false

在行使上述指挥权后,试验航道窗的布局将显示假旗。

此外,拖欠的公用时间为4秒,由缺省组合确定,而不是由气压压推翻。 json值为9秒。

Default Command Timeout

Cypress - Reports

风暴与Mocha交火。 因此,可能为Mocha编写的任何报告也可以用“旋风”加以利用。 除此以外,还有其他第三方记者,如Junnit和团队精神。

Mochawesome Report

Mochaweous报告是“Cypress”中最重要的报告之一。

    页: 1


npm install mochawesome --save-dev

以下屏幕将登在你的电脑上:

Install Mochawesome

    安装 mo,指挥线如下:


npm install mocha --save-dev

以下屏幕将登在你的电脑上:

Install Mocha


npm install mochawesome-merge --save-dev

以下屏幕将登在你的电脑上:

Merge Mochawesome JSON Reports

在安装后,所有这些包裹都应反映在包件上。 json案。

将多份报告合并为一份报告,由以下指挥:


npm run combine-reports

Configurations in cypress.json file

In the cypress.json file, we can set the following configurations for the mochawesome reports −

    overwrite − If its value is set to false, there should not be any overwriting from the prior generated reports.

    报告应予保存。

    quiet − If its value is set to true, there should not be any Cypress related output. Only the mochawesome output has to be printed.

    html − If its value is set to false, there should not be any generation of html reports after execution.

    json——如果其价值被确定为真实,将产生一份载有执行细节的json档案。

Implementation in cypress.json

cy杂报告的执行情况。 json如下:


{
   "reporter": "mochawesome",
   "reporterOptions": {
      "reportDir": "cypress/results",
      "overwrite": false,
      "html": false,
      "json": true
   }
}

1. 为气旋风暴项目整合者的所有光谱编制一份报告,其指挥范围如下:


npx cypress run

进行特定试验,由以下指挥进行:


npx cypress run --spec "<path of spec file>"

在完成执行后,在“Cypress”项目内产生了 mo状报告夹,其中包含以html和json格式撰写的报告。

JSON Formats.

Right-cpck on the mochawesome.html report. 然后选择制版路,打开浏览器上铺路。

Mochawesome HTML

令人不安的报告在开篇时附有执行结果、期限、测试案例名称、测试步骤等细节。

在对屏幕左上角的icon(以上述图像为亮点)进行点击时,展示出更多的选择。

Mochawesome Report

我们可以得出不同的看法,选择过去、失败、等待、天空的测试案例,以及适用于试验的hoo。

JUnit Report

气旋风暴还提供了另外一种称为Junnit报告的报告。

安装JUSG报告包,指挥如下:


npm install cypress-junit-reporter --save-dev

以下屏幕将登在你的电脑上:

JUnit Report

Implementation in cypress.json

下面是《日元报告》的执行情况。 json -


{
   "reporter": "junit",
   "reporterOptions": {
      "mochaFile": "cypress/results/results.xml",
      "toConsole": true
   }
}

如果我们进行多次测试,并希望有一份单独光谱档案的独特报告,我们就必须在风暴中增加[hash]。 碎块中的卷宗参数。 json。

Implementation to avoid overriding report

下面是cy。 json, 避免在Cypress发表压倒一切的报告


{
   "reporter": "junit",
   "reporterOptions": {
      "mochaFile": "cypress/results/results-[hash].xml",
      "toConsole": true
   }
}

3. 为“旋风”项目集成夹中的所有光谱生成报告,由以下指挥:


npx cypress run --reporter junit

以下屏幕将登在你的电脑上:

Cypress Project

在完成执行后,结果夹在含有Xml格式报告的Cypress项目中产生。

teamcity Report

气旋风暴提供了另外一种称为团队精神报告的报告。

安装小组报告包,操作如下:


npm install cypress-teamcity-reporter --save-dev

以下屏幕将登在你的电脑上:

Teamcity Report

3. 为“旋风”项目集成夹中的所有光谱生成报告,由以下指挥:


npx cypress run --reporter teamcity

以下屏幕将登在你的电脑上:

Running

Cypress - Plugins

热带风暴有多种金.,可增加其特征。 有许多种金,如认证、部件测试、习俗指挥、开发工具等等。

一些突出的金刚石包括:

perform file upload mission, in Cypress, 我们必须先到install a plugin,以下称呼:


npm install –dev cypress-file-upload

一旦安装完毕,我们就必须在指挥.js档案中增加说明进口气压单上载荷,该档案存放在Cypress项目内的支持夹内。

为了配合框架,首先,我们必须安装Cypress plugin for ,其指挥如下:


npm install –D cypress-iframe

然后,我们必须在《守则》中添加关于进口气压参数的声明。

指明由Xpath 定位器组成的部件,指挥如下:


npm install cypress-xpath

一旦安装完毕,我们就必须在索引.js档案中添加说明要求(“电压-xpath”),该档案位于“Cypress”项目内的支持夹内。

此外,我们必须利用cy子的指挥确定要素。

可使用的主题,我们必须安装一个包含以下所述指挥的假象:


npm install --save-dev cypress-dark

Once the installation is done, we have to add the statement require ("cypress-dark") within the index.js file, which resides inside the support folder within the Cypress project.

Cypress - GitHub

为了将“旋风”与Gite Hub相结合,我们必须首先安装“Gite Hub App”。 无论是从组织一体化环境中,还是从Cypress Dash板的项目环境中,都可以做到这一点。

Installation

可以通过两种方式安装Gite Hub App。 详细情况如下。

Installation via organization integration settings

采取下文所述步骤,通过组织一体化环境安装Gite Hub——

    5. 前往达什板组织网页。

    选择一个你希望与Gite Hub账户或组织合并的组织。

    将选定组织的一体化选择从航行到一侧。

    接着,点击了Gite Hub Integration button。

Installation via project settings

采取下文所述步骤,通过项目环境安装Gite Hub

    选择组织内部的开业者。

    • 选择你希望与Gite Hub的邮袋合并的项目。

    进入项目环境网页。

    加入Gite/2007/5。

    Cpck on Install the Cypress IXutu App.

吉苏·霍姆(签名) 安装完毕后,我们将前往Gite Hub.com,采取下列进一步步骤:

    选择Gite Hub组织或与该组织的Cypress Dash板合并账户。

    其次,我们必须把所有Gite Hub的存放处或一个特别存放处与Gypressite Hub App合并。

    Cpck on the Install button to end facipties.

GitHub Integration Enabpng

使Gite Hub能够融入Cypress进程的解释如下:

    进入项目环境网页。

    前往Gite Hub整合科,然后点击Jigure。

    从Gite Hub选定一个存放处,以便与该项目相结合。

    As GitHub repo is connected to a Cypress project, the GitHub integration shall be enabled.

Advertisements