Skip to content

Instantly share code, notes, and snippets.

View rahulmr's full-sized avatar
🏠
Working from home

Rahul Raut rahulmr

🏠
Working from home
View GitHub Profile
@rahulmr
rahulmr / registrationPageSelectors.py
Created September 28, 2022 15:51 — forked from SarahElson/registrationPageSelectors.py
Playwright Python Tutorial: Getting Started With Python End To End Testing
webElements = {
'webpage': "https://ecommerce-playground.lambdatest.io/index.php?route=account/register",
'First_Name': 'input[placeholder="First Name"]',
'Last_Name': 'input[placeholder="Last Name"]',
'E-Mail': 'input[placeholder="E-Mail"]',
'Telephone': 'input[placeholder="Telephone"]',
'Password': 'input[placeholder="Password"]',
'Confirm_Password': 'input[placeholder="Password Confirm"]',
'Subscribe': 'label:has-text("No")',
'Privacy_Policy': 'label:has-text("I have read and agree to the Privacy Policy")',
@rahulmr
rahulmr / singleSignupScript.py
Created September 28, 2022 15:50 — forked from SarahElson/singleSignupScript.py
Playwright Python Tutorial: Getting Started With Python End To End Testing
from playwright.sync_api import sync_playwright
import sys
sys.path.append(sys.path[0] + "/..")
from elementSelectors.registrationPageSelectors import elementSelector
from testCapabilities.testCaps import testCapabilities
select = elementSelector()
@rahulmr
rahulmr / singleSignupRun.py
Created September 28, 2022 15:47 — forked from SarahElson/singleSignupRun.py
Playwright Python Tutorial: Getting Started With Python End To End Testing
import sys
sys.path.append(sys.path[0] + "/..")
from testScripts.singleSignupScript import Register
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
try:
import sys
sys.path.append(sys.path[0] + "/..")
from testScripts.parallelLoginBuyScript import LoginAndBuy
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
try:
playwright = LoginAndBuy(playwright)
@rahulmr
rahulmr / singleLoginButScript.py
Created September 26, 2022 20:27 — forked from SarahElson/singleLoginButScript.py
Playwright Python Tutorial: Getting Started With Python End To End Testing
from playwright.sync_api import sync_playwright
import sys
sys.path.append(sys.path[0] + "/..")
from elementSelectors.loginAndBuySelectors import elementSelector
from testCapabilities.testCaps import testCapabilities
select = elementSelector()
@rahulmr
rahulmr / singleLoginBuyRun.py
Created September 26, 2022 20:26 — forked from SarahElson/singleLoginBuyRun.py
Playwright Python Tutorial: Getting Started With Python End To End Testing
import sys
sys.path.append(sys.path[0] + "/..")
from testScripts.singleLoginBuyScript import LoginAndBuy
from playwright.sync_api import sync_playwright
with sync_playwright() as playwright:
try:
playwright = LoginAndBuy(playwright)
@rahulmr
rahulmr / setUp.py
Created September 26, 2022 20:26 — forked from SarahElson/setUp.py
How To Drag And Drop In Selenium With Python?
def setUp(self):
username = "your_lambdatest_username"
# Register on lambdatest, if you’ve not already. It hardly takes 30 seconds to 2 minutes to get started.
accessToken = "your_lambdatest_accessToken"
# You can find access token post registration on your LambdaTest profile page.
gridUrl = "hub.lambdatest.com/wd/hub"
desired_cap = {
'platform' : "win10",
'browserName' : "chrome",
'version' : "67.0",
@rahulmr
rahulmr / proxy_views.py
Created April 26, 2022 20:22 — forked from joeshaw/proxy_views.py
super-hacky flask proxy
# coding:utf-8
# Copyright 2011 litl, LLC. All Rights Reserved.
import httplib
import re
import urllib
import urlparse
from flask import Blueprint, request, Response, url_for
from werkzeug.datastructures import Headers
@rahulmr
rahulmr / HttpClient.cs
Created April 20, 2022 11:48 — forked from dfch/HttpClient.cs
HttpClient and how to use Headers, Content-Type and PostAsync
// HttpClient and how to use Headers, Content-Type and PostAsync
// http://d-fens.ch/2014/04/12/httpclient-and-how-to-use-headers-content-type-and-postasync/
// Copyright 2014-2015 Ronald Rink, d-fens GmbH
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
@rahulmr
rahulmr / warp_log_headers.rs
Created April 20, 2022 11:40 — forked from Szymongib/warp_log_headers.rs
Filter to log request headers using Warp framework
// [dependencies]
// tokio = { version = "0.2", features = ["macros"] }
// warp = "0.2.2"
use warp::Filter;
use warp::http::HeaderMap;
use std::convert::Infallible;
#[tokio::main]
async fn main() {