Skip to content

Instantly share code, notes, and snippets.

View imshaiknasir's full-sized avatar
🎯
Being consistent

NASIR imshaiknasir

🎯
Being consistent
View GitHub Profile
## Study
@imshaiknasir
imshaiknasir / alllurePATH_fix.md
Created December 25, 2024 10:13
allure command is not recognized, meaning the Allure CLI is not installed or not added to the system PATH. Here’s how to resolve this issue:

Steps to Fix

  1. Install Allure CLI
    • If you haven’t already installed the Allure CLI, you need to do so. You can install it using Node.js or manually:
      • Using Node.js:
        npm install -g allure-commandline --save-dev
        This installs Allure globally and adds it to your PATH.
@imshaiknasir
imshaiknasir / PlaywrightSkeleton.md
Created December 25, 2024 10:03
Yes, Playwright provides a project skeleton or structure when you initialize a new project using the Playwright CLI. You can create and view the Playwright skeleton by following these steps:

Yes, Playwright provides a project skeleton or structure when you initialize a new project using the Playwright CLI. You can create and view the Playwright skeleton by following these steps:


1. Initialize Playwright Project

Run the following command to initialize a new Playwright project:

npx playwright init
@imshaiknasir
imshaiknasir / fixNPMintiIssue.md
Last active January 13, 2026 19:15
PowerShell blocks the `npm init playwright` command due to a restrictive execution policy, preventing the unsigned `npm.ps1` script from running. Adjust the policy temporarily using `Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass` to resolve.

Here are the steps to fix the issue persistently:

  1. Open PowerShell as Administrator:

    • Search for "PowerShell" in the Start menu.
    • Right-click it.
    • Select Run as Administrator.
  2. Check Current Execution Policy:

    • Run this command in PowerShell: Get-ExecutionPolicy -List

codes

@imshaiknasir
imshaiknasir / Cursor Ubuntu Desktop App.md
Created November 24, 2024 19:45
Cursor IDE AppImage with --no-sandbox flag

Running Cursor IDE AppImage with --no-sandbox flag

This Gist provides a solution for running the Cursor IDE AppImage on systems where sandboxing issues may occur.

Problem

Some Electron-based AppImages, like Cursor IDE, may encounter sandboxing errors, preventing them from launching correctly.

Solution

[
{
"id": 1,
"bank_name": "ABHYUDAYA CO-OPERATIVE BANK"
},
{
"id": 2,
"bank_name": "AIRTEL PAYMENTS BANK LIMITED"
},
{
@imshaiknasir
imshaiknasir / ConnectingToExistingChrome.md
Created September 27, 2024 12:15
Existing Chrome Session with Playwright

Existing Chrome Session with Playwright

Connecting to an Existing Chrome Session with Playwright: A Comprehensive Guide

In the ever-evolving world of web development, automation is a game-changer. Whether you're a developer, tester, or tech enthusiast, automating browser tasks can significantly enhance productivity. One powerful tool for browser automation is Playwright, a versatile framework that supports multiple browsers and languages. In this guide, we'll delve into how to connect to an existing Chrome session using Playwright and execute some basic tasks.

Step 1: Launch Chrome with Remote Debugging

To connect Playwright to a running Chrome session, you need to start Chrome with remote debugging enabled. This setup allows Playwright to communicate with the browser via a debugging port.

@imshaiknasir
imshaiknasir / Refactored-Calendar-Automation-with-Playwright.js
Created September 22, 2024 18:51
Playwright Test Script for Calendar Validation with Dynamic Year Navigation
const { test, expect } = require('@playwright/test');
test.only('Calendar Validations', async ({ browser, page }) => {
const date = "15";
const monthNumber = "6";
const year = "1690";
const currentYear = new Date().getFullYear();
await page.goto("https://rahulshettyacademy.com/seleniumPractise/#/offers");
await page.locator(".react-date-picker__inputGroup").click();
// ==UserScript==
// @name Twitter Translate Button
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add a translate button to tweets
// @match https://twitter.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
(function() {