IWebBrowser.IsBrowserClosed
This commit is contained in:
parent
4e8a307f3d
commit
d8a4dc4d17
|
|
@ -25,6 +25,7 @@ public interface IWebBrowser
|
|||
Task<string> ExtractData(BrowserActionParams actionParams);
|
||||
Task<T> EvaluateScript<T>(string contextId, string script);
|
||||
Task CloseBrowser(string contextId);
|
||||
Task<bool> IsBrowserClosed(string contextId);
|
||||
Task<BrowserActionResult> CloseCurrentPage(MessageInfo message);
|
||||
Task<BrowserActionResult> SendHttpRequest(MessageInfo message, HttpRequestParams actionParams);
|
||||
Task<BrowserActionResult> GetAttributeValue(MessageInfo message, ElementLocatingArgs location);
|
||||
|
|
|
|||
|
|
@ -78,4 +78,9 @@ public partial class PlaywrightWebDriver : IWebBrowser
|
|||
await page.Keyboard.PressAsync(key);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<bool> IsBrowserClosed(string contextId)
|
||||
{
|
||||
return !_instance.Contexts.ContainsKey(contextId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue