Skip to content

Commit cd3af6e

Browse files
authored
correctly checks the driver supports DevTools (#10819)
fixes #10776
1 parent 5532a8d commit cd3af6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dotnet/src/webdriver/JavaScriptEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public JavaScriptEngine(IWebDriver driver)
5454
this.session = new Lazy<DevToolsSession>(() =>
5555
{
5656
IDevTools devToolsDriver = driver as IDevTools;
57-
if (session == null)
57+
if (devToolsDriver == null)
5858
{
5959
throw new WebDriverException("Driver must implement IDevTools to use these features");
6060
}

0 commit comments

Comments
 (0)