From 8b546f96e7288d4ec43cf7a8eb33a7db181a391a Mon Sep 17 00:00:00 2001 From: itq148 Date: Tue, 24 Mar 2026 21:41:10 +0900 Subject: [PATCH] fix: pass context_id instead of browser_id to BrowserContext.close --- lib/playwright_ex/channels/browser_context.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/playwright_ex/channels/browser_context.ex b/lib/playwright_ex/channels/browser_context.ex index 88ff214..5573c46 100644 --- a/lib/playwright_ex/channels/browser_context.ex +++ b/lib/playwright_ex/channels/browser_context.ex @@ -209,12 +209,12 @@ defmodule PlaywrightEx.BrowserContext do @schema schema @type close_opt :: unquote(NimbleOptions.option_typespec(schema)) @spec close(PlaywrightEx.guid(), [close_opt() | PlaywrightEx.unknown_opt()]) :: {:ok, any()} | {:error, any()} - def close(browser_id, opts \\ []) do + def close(context_id, opts \\ []) do {connection, opts} = opts |> PlaywrightEx.Channel.validate_known!(@schema) |> Keyword.pop!(:connection) {timeout, opts} = Keyword.pop!(opts, :timeout) connection - |> Connection.send(%{guid: browser_id, method: :close, params: Map.new(opts)}, timeout) + |> Connection.send(%{guid: context_id, method: :close, params: Map.new(opts)}, timeout) |> ChannelResponse.unwrap(& &1) end