This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test.spec.js | |
describe('Regular Expressions in Cypress', () => { | |
it('should demonstrate the usage of regular expressions', () => { | |
// Example 1: Validating an email address using regex | |
cy.get('#email-input').type('example@test.com'); | |
cy.get('#email-input').should('match', /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/); | |
// Example 2: Verifying the presence of a phone number using regex for format "Phone: +XXX-XXX-XXX-XXXX", where X represents a digit | |
cy.contains(/^Phone:\s+\+\d{1,3}-\d{3}-\d{3}-\d{4}$/); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// type definitions for Cypress object "cy" | |
/// <reference types="cypress" /> | |
describe('My First Cypress Test', function() { | |
it('verifies that each child element of myElement contains the expected text str.', () => { | |
const myElement = cy.get('#my-element'); | |
let str = TextToValidate; | |
myElement.its('length') | |
.then(count => { | |
cy.log('count='+count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileOutputStream; | |
import org.apache.poi.xssf.usermodel.XSSFCell; | |
import org.apache.poi.xssf.usermodel.XSSFRow; | |
import org.apache.poi.xssf.usermodel.XSSFSheet; | |
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |
public class excel_Functions1 { |