pyrit.prompt_target.PlaywrightTarget#
- class PlaywrightTarget(*, interaction_func: InteractionFunction, page: None)[source]#
Bases:
PromptTarget
PlaywrightTarget uses Playwright to interact with a web UI.
- Parameters:
interaction_func (InteractionFunction) – The function that defines how to interact with the page.
page (Page) – The Playwright page object to use for interaction.
Methods
__init__
(*, interaction_func, page)dispose_db_engine
()Dispose DuckDB database engine to release database connections and resources.
get_identifier
()send_prompt_async
(*, prompt_request)Sends a normalized prompt async to the prompt target.
Attributes
- async send_prompt_async(*, prompt_request: PromptRequestResponse) PromptRequestResponse [source]#
Sends a normalized prompt async to the prompt target.