Skip to content

Commit c9c4913

Browse files
kelmelzerDor-bl
andauthored
break: ExecuteAsync() under the hood implementation after bumping to Selenium 4.23 (#804)
* Update AppiumDriver.cs * Update AppiumCommandExecutor.cs * Update Appium.Net.csproj * Revert "Update Appium.Net.csproj" This reverts commit bb0308a. * Revert "Update AppiumCommandExecutor.cs" This reverts commit c2ebe40. * bump to selenium 4.23, added executeasync passthrough impl * Revert "Update AppiumDriver.cs" This reverts commit f7854e3. * whoops, missing namespace * fliped around logic for Execute and ExecuteAsync, Execute now passes through to ExecuteAsync * fixed execute and executeasync * Update src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs Co-authored-by: Dor Blayzer <[email protected]> * Update src/Appium.Net/Appium.Net.csproj Co-authored-by: Dor Blayzer <[email protected]> --------- Co-authored-by: Dor Blayzer <[email protected]>
1 parent 052489b commit c9c4913

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/Appium.Net/Appium.Net.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
<PrivateAssets>all</PrivateAssets>
5959
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
6060
</PackageReference>
61-
<PackageReference Include="Selenium.Support" Version="4.21.0" />
62-
<PackageReference Include="Selenium.WebDriver" Version="4.21.0" />
61+
<PackageReference Include="Selenium.Support" Version="4.23.0" />
62+
<PackageReference Include="Selenium.WebDriver" Version="4.23.0" />
6363
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
6464
</ItemGroup>
6565
<ItemGroup>

src/Appium.Net/Appium/Service/AppiumCommandExecutor.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using OpenQA.Selenium.Remote;
1616
using System;
17+
using System.Threading.Tasks;
1718

1819
namespace OpenQA.Selenium.Appium.Service
1920
{
@@ -54,13 +55,18 @@ internal AppiumCommandExecutor(AppiumLocalService service, TimeSpan timeForTheSe
5455
}
5556

5657
public Response Execute(Command commandToExecute)
58+
{
59+
return Task.Run(() => ExecuteAsync(commandToExecute)).GetAwaiter().GetResult();
60+
}
61+
62+
public async Task<Response> ExecuteAsync(Command commandToExecute)
5763
{
5864
Response result = null;
5965

6066
try
6167
{
6268
bool newSession = HandleNewSessionCommand(commandToExecute);
63-
result = RealExecutor.Execute(commandToExecute);
69+
result = await RealExecutor.ExecuteAsync(commandToExecute).ConfigureAwait(false);
6470
if (newSession)
6571
{
6672
RealExecutor = UpdateExecutor(result, RealExecutor);

0 commit comments

Comments
 (0)