
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 201 Articles for Dynamic Programming

939 Views
We can implement tags in Cypress. Cypress has tags - .only and .skip. While the .only tag is utilized to execute the it block to which it is tagged, the .skip tag is utilized to exclude the it block to which it is tagged.ExampleImplementation with .onlydescribe('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") }) })Execution ResultsThe output ... Read More

519 Views
We can implement hooks in Cypress. Cypress Hooks are used to carrying out certain operations prior/post every/each test. Some of the common hooks are −before – Executes once prior execution any tests within a describe block.after – Executes once post-execution all tests within a describe block.beforeEach – Executes prior execution of the individual it blocks within a describe block.afterEach – Executes post-execution of the individual it blocks within a describe block.ExampleImplementationdescribe('Tutorialspoint', function() { before(function() { // executes once prior all tests in it block cy.log("Before hook") }) after(function() { ... Read More

170 Views
The below diagram explains the working of the Cypress −Automation tools like Selenium work by running outside the browser. However, Cypress has a different architecture. It runs within the browser. Cypress is based on the server - Node.js.There is a continuous interaction of Cypress with the Node.js and they work in – coordination with each other. As a result, Cypress can be utilized for testing both the front and backend of the application.Cypress is thus capable of handling the tasks performed in a real-time on the UI and simultaneously perform actions outside of the browser. The basic differences between Cypress ... Read More

3K+ Views
We can handle frames in Puppeteer. The frames in an html code are represented by the frames/iframe tag. Puppeteer can handle frames by switching from the main page to the frame. To work with elements inside a frame, first, we have to identify the frame with the help of locators. The method contentFrame is used to access the elements inside the frame.Syntaxconst f = await page.$("frame[name='frame-bottom']") const m = await f.contentFrame()Let us see the html code of an element inside a frame and obtain the text - BOTTOM inside it.The tagname highlighted in the above image is frame and the ... Read More

301 Views
We can handle tabs in Puppeteer using the below methods −newPage() - We can open a new tab using this method available in the browser object.Syntaxconst p = await browser.newPage()close() - We can close the tab opened using this method.Syntaxawait p.close() close() - We can close all the tabs opened using this method available in the browser object.Syntaxawait browser.close()ExampleCode Implementation//adding Puppeteer library const pt = require('puppeteer') pt.launch().then(async browser => { //browser new page const p = await browser.newPage(); //set viewpoint of browser page await p.setViewport({ width: 1000, height: ... Read More

9K+ Views
We can pass more than one header in a request in Rest Assured. A web service can accept headers as parameters while making a service call. The headers are represented in a key-value pair.There is more than one way of passing multiple headers in Rest Assured −Passing them in a key-value format using the header method.Syntax Response r = given() .baseUri("https://www.tutorialspoint.com/") .header("header1", "value1") .header("header2", "value2") .get("/about/about_careers.htm");Passing them as a Map using the headers method.Syntax Map m = new HashMap(); m.put("header1", "value1"); m.put("header2, "value2"); Response r = given() .baseUri("https://www.tutorialspoint.com/") .headers(m) .get("/about/about_careers.htm");Passing them as a List using the headers method.Syntax List h ... Read More

1K+ Views
We can manage cookies in WebdriverIO. A cookie helps to identify a user. It is an efficient technique to pass information from one site session to another or in between sessions of two connected websites.We can add, delete and obtain a cookie with WebdriverIO using the methods −browser.setCookies - this is used to set a single cookie or multiple cookies for the present page. To set a cookie for a page, we have to first launch and be on that page.Syntax browser.setCookies({cookie, cookie.name, cookie.value, cookie.path, cookie.domain, cookie.secure, cookie.httpOnly, cookie.expiry} )Here, a cookie is the cookie object or object array and ... Read More

803 Views
We can create a teamcity report in Cypress. To install the package for teamcity report, run the command − npm install cypress-teamcity-reporter --save-devTo generate a report for all specs in the integration folder of the Cypress project, run the command − npx cypress run --reporter teamcity

3K+ Views
We can create a Junit report in Cypress. To install the package for the JUnit report, run the command − npm install cypress-junit-reporter --save-devExampleImplementation in cypress.json{ "reporter": "junit", "reporterOptions": { "mochaFile": "cypress/results/results.xml", "toConsole": true } }If we run multiple tests in a run and wish to have a unique report for individual spec files, we have to add [hash] in the mochaFile parameter in cypress.json.ExampleImplementation in cypress.json to avoid overriding report{ "reporter": "junit", ... Read More

5K+ Views
We can create a Mochawesome report in Cypress. Cypress is bundled with Mocha, so any reports that can be generated for Mocha can also be utilized with Cypress.Mochawesome ReportThe Mochawesome report is one of the most important reports in Cypress. To install mochawesome, run the command − npm install mochawesome --save-devTo install mocha, run the command − npm install mocha --save-devTo merge mochawesome json reports, run the command − npm install mochawesome-merge --save-devAll these packages after installation should get reflected on the package.json file.To merge multiple reports in a single report, run the command − npm run combine-reportsIn the cypress.json ... Read More