Skip to content

Commit 588bc7d

Browse files
committed
[dotnet] Improve bidi exception when it is not enabled
1 parent 65af639 commit 588bc7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/webdriver/BiDi/WebDriver.Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static async Task<BiDi> AsBiDiAsync(this IWebDriver webDriver)
3030
{
3131
var webSocketUrl = ((IHasCapabilities)webDriver).Capabilities.GetCapability("webSocketUrl");
3232

33-
if (webSocketUrl is null) throw new System.Exception("The driver is not compatible with bidirectional protocol or it is not enabled in driver options.");
33+
if (webSocketUrl is null) throw new BiDiException("The driver is not compatible with bidirectional protocol or \"webSocketUrl\" not enabled in driver options.");
3434

3535
var bidi = await BiDi.ConnectAsync(webSocketUrl.ToString()!).ConfigureAwait(false);
3636

0 commit comments

Comments
 (0)