Posts

Showing posts from 2019

Cypress Cheat Sheet

Since you have landed on this blog post which means you already have started to know about Cypress and wanted have a quick glance of the Cypress commands. Cypress Commands /// <reference types="Cypress"/> add the above line to make use of intelli sense in cypress ide visual studio code editor cy.visit similary to driver.get() or navigate() in Selenium Webdriver. To launch a url in the browser. cy.get('csslocator') get is like findElement, identifies the element in the web page based on css provided. wait explicitly for an element: cy.get('#id1', {timeout: <timeinmilliseconds>}) when finding an element, adding additional parameter "timeout" makes cypress to wait for the specified time interval until the element is visible. cy.wait(time) similar to thread.sleep cy.type('learner') enters text in the textbox cy.get('#abc:visible') retrieves only visible elements cy.get('#abc').find('

Interacting with Existing chrome browser using Selenium Webdriver

The only pain when working with WebDriver is to re-run the whole test after the test failure. This can be handled writing wrapper to fetch the Remote Webdriver session url and session id of the launched browser. The working code mentioned in the blog post is tested in chrome browser. However the code developed can be extended to other browsers as well. The Java Class with working code is available in github  link .