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 - Dropdown
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。
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 ) }) })
产出如下:
The output shows that the Country dropdown selects the option India (in the html code, this option is identified with the value as 99).
Advertisements