init: MVP

This commit is contained in:
Arthur K. 2025-01-31 17:05:07 +03:00
commit 46e870be42
Signed by: wzray
GPG key ID: B97F30FDC4636357
17 changed files with 1202 additions and 0 deletions

View file

@ -0,0 +1,17 @@
import random
from contextlib import _GeneratorContextManager
from seleniumbase import BaseCase, SB as _SB
def random_string(n: int, format = '[a-zA-Z0-9]') -> str:
format = format[1:-1]
chars = ''
for i in range(0, len(format), 3):
for j in range(ord(format[i]), ord(format[i+2]) + 1):
chars += chr(j)
return ''.join(random.choice(chars) for _ in range(n))
# make seleniumbase somewhat typed
def SB() -> _GeneratorContextManager[BaseCase]:
return _SB(uc = True)