Skip to content

Commit

Permalink
correctly checks the driver supports DevTools (#10819)
Browse files Browse the repository at this point in the history
fixes #10776
  • Loading branch information
elgatov committed Jul 5, 2022
1 parent 5532a8d commit cd3af6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dotnet/src/webdriver/JavaScriptEngine.cs
Expand Up @@ -54,7 +54,7 @@ public JavaScriptEngine(IWebDriver driver)
this.session = new Lazy<DevToolsSession>(() =>
{
IDevTools devToolsDriver = driver as IDevTools;
if (session == null)
if (devToolsDriver == null)
{
throw new WebDriverException("Driver must implement IDevTools to use these features");
}
Expand Down

0 comments on commit cd3af6e

Please sign in to comment.