1 В head страницы добавляем:
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2/webcomponents-loader.min.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"></script>| MIT License | |
| Copyright (c) 2025 Iakiv Kramarenko | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| import types | |
| from functools import wraps | |
| def humanify(name: str): | |
| import re | |
| return ' '.join(re.split('_+', name)) | |
| def step(fn): |
| import re | |
| import inspect | |
| from functools import wraps | |
| from allure_commons import plugin_manager | |
| from allure_commons.utils import uuid4, func_parameters, represent | |
| def step(title, display_params=True): | |
| if callable(title): |
| class Cell: | |
| def __init__(self, element: Element): | |
| self.element = element | |
| self.input = self.element.element('input') | |
| def start_editing(self): | |
| self.element.double_click() | |
| return self | |
| def set(self, value): |
| import contextlib | |
| from selenium import webdriver | |
| from selenium.common.exceptions import NoSuchElementException | |
| from selenium.webdriver.common.keys import Keys | |
| import stopit | |
| import time | |
| browser = webdriver.Firefox() |
1 Берем пример svg (как код) с текстом по кругу. Сохраняем у себя в gist, где сразу можно просматривать результат...
редактируем...
| // виходить тут як раз воно не вилазить | |
| function processResponse({response, ...rest}: {response: object} & {[key: string]: any}): {response: object;} & {[key: string]: any} { | |
| // do something with response | |
| return {response, ...rest} | |
| } | |
| // вилазити починає саме коли з'являється обмження що саме конкретно той тип А що зайшов на вхід то той і має вийти на виході... | |
| function processResponse_<A>({response, ...rest}: {response: object} & A): {response: object;} & A { | |
| // do something with response |
| """ | |
| можно передавать лямбды вместо кондишенов в Selene | |
| но в лямбдах-кондишенах для Selene | |
| нужно возвращать не тру/фолс, а просто кидать еррор если было фолс | |
| например | |
| """ |