Skip to content

Instantly share code, notes, and snippets.

View sadukie's full-sized avatar

Sarah Dutkiewicz sadukie

View GitHub Profile
@sadukie
sadukie / AuthenticatedPlaywrightDriver.cs
Created April 30, 2024 16:03
Using Shared State in Playwright for .NET
using Microsoft.Playwright;
using NimblePros.SuperSecretProject.FrontEndTests.PageObjects;
namespace NimblePros.SuperSecretProject.FrontEndTests;
internal class AuthenticatedPlaywrightDriver : IDisposable
{
private IPlaywright? _playwright;
private IBrowser? _browser;
private IBrowserContext? _context;
public AuthenticatedPlaywrightDriver()
@sadukie
sadukie / 0-getPasswordsDefaultAzureCredential.py
Last active October 17, 2022 14:47
Authentication with the Azure Identity SDK for Python
import os
from azure.keyvault.secrets import SecretClient
from azure.identity import DefaultAzureCredential
keyVaultName = os.environ["KEY_VAULT_NAME"]
tenantId = os.environ["AZURE_TENANT_ID"]
secretName = "SecretPassword"
KVUri = f"https://{keyVaultName}.vault.azure.net"
# Breaking changes in 1.11.0