Skip to content

Commit 8d4ef16

Browse files
committed
[dotnet] fix build for Selenium 4.41 async DriverFinder/SeleniumManager APIs
Made-with: Cursor
1 parent 5d614fc commit 8d4ef16

5 files changed

Lines changed: 5 additions & 4 deletions

File tree

examples/dotnet/SeleniumDocs/Browsers/ChromeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private static string GetChromeLocation()
163163
{
164164
BrowserVersion = "stable"
165165
};
166-
return new DriverFinder(options).GetBrowserPath();
166+
return new DriverFinder(options).GetBrowserPathAsync().AsTask().GetAwaiter().GetResult();
167167
}
168168
}
169169
}

examples/dotnet/SeleniumDocs/Browsers/EdgeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ private static string GetEdgeLocation()
157157
{
158158
BrowserVersion = "stable"
159159
};
160-
return new DriverFinder(options).GetBrowserPath();
160+
return new DriverFinder(options).GetBrowserPathAsync().AsTask().GetAwaiter().GetResult();
161161
}
162162
}
163163
}

examples/dotnet/SeleniumDocs/Browsers/FirefoxTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private static string GetFirefoxLocation()
203203
{
204204
BrowserVersion = "stable"
205205
};
206-
return new DriverFinder(options).GetBrowserPath();
206+
return new DriverFinder(options).GetBrowserPathAsync().AsTask().GetAwaiter().GetResult();
207207
}
208208

209209
private void ResetGlobalLog()

examples/dotnet/SeleniumDocs/Drivers/ServiceTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void DriverPort()
3636

3737
private static string GetDriverLocation(ChromeOptions options)
3838
{
39-
return new DriverFinder(options).GetDriverPath();
39+
return new DriverFinder(options).GetDriverPathAsync().AsTask().GetAwaiter().GetResult();
4040
}
4141

4242
private static ChromeOptions GetLatestChromeOptions()

examples/dotnet/SeleniumDocs/Troubleshooting/LoggingTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.VisualStudio.TestTools.UnitTesting;
22
using OpenQA.Selenium;
33
using OpenQA.Selenium.Internal.Logging;
4+
using OpenQA.Selenium.Manager;
45
using OpenQA.Selenium.Remote;
56
using System;
67
using System.IO;

0 commit comments

Comments
 (0)