Skip to content

Instantly share code, notes, and snippets.

View heyrmi's full-sized avatar
🎯
Focusing

Rahul heyrmi

🎯
Focusing
View GitHub Profile
import { browser, $ } from '@wdio/globals'
import { expect } from '@wdio/expect-webdriverio'
describe('WebdriverIO API Overview', () => {
before(async () => {
await browser.url('https://example.com')
})
it('demonstrates WebdriverIO APIs', async () => {
// 1. Browser Navigation
/// <reference types="cypress" />
describe('Cypress API Overview', () => {
beforeEach(() => {
cy.visit('https://example.com');
});
it('demonstrates Cypress APIs', () => {
// 1. Navigation
cy.visit('https://example.com/page');
import { chromium, firefox, webkit, Browser, BrowserContext, Page, Locator, expect } from '@playwright/test';
async function playwrightExample() {
// 1. Browser Launch
const browser: Browser = await chromium.launch();
// Can also use firefox.launch() or webkit.launch()
// 2. Browser Context and Page
const context: BrowserContext = await browser.newContext();
const page: Page = await context.newPage();
import org.openqa.selenium.*;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.support.ui.*;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v91.network.Network;
import org.openqa.selenium.devtools.v91.performance.Performance;
@heyrmi
heyrmi / nvmCommands.js
Created August 3, 2024 06:11 — forked from chranderson/nvmCommands.js
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node

Selenide cheat sheet

Selenide is a Java framework for test automation powered by Selenium WebDriver that brings the following advantages:

  • Concise fluent API for tests
  • Ajax support for stable tests
  • Powerful selectors
  • Simple configuration

Official Documentation

@heyrmi
heyrmi / Grind75.java
Last active October 2, 2023 08:22
Program for scraping Grind75 question list in a text file, useful when want to track locally.
package org.heyrmi;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@heyrmi
heyrmi / grokking_to_leetcode.md
Created July 27, 2023 10:02 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window