Skip to content

Instantly share code, notes, and snippets.

View Galileo1's full-sized avatar
💭
learning

Varun Gaur Galileo1

💭
learning
View GitHub Profile
{
"compilerOptions": {
// This must be specified if "paths" is set
"baseUrl": ".",
// Relative to "baseUrl"
"paths": {
"*": [
"*",
"src/*",
]
@Galileo1
Galileo1 / Puppeteer_Page.js
Last active December 9, 2021 09:14
Puppeteer Page class extend
/**
* Puppeteer Page class extension
*/
const Page = require('puppeteer/lib/Page').Page;
/**
* Returns the locator on the page
* @param {string} selector on the page
* @returns {Promise<JSHandle>} promise of type JSHandle
@Galileo1
Galileo1 / ProtractotElement.Extend.ts
Created January 28, 2018 08:47
Typescript Protractor extending ElementFinder and ElementArrayFinder
import { ElementArrayFinder, ElementFinder, promise} from 'protractor';
declare module 'protractor/built/element' {
export interface ElementArrayFinder {
getByText(text: string) : ElementFinder;
hasItem(text: string) : Promise<boolean>;
}
export interface ElementFinder {