Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<PackageVersion Include="System.Text.Json" Version="9.0.9" />
<PackageVersion Include="System.IO.Hashing" Version="9.0.9" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.9" />
<PackageVersion Include="Appium.WebDriver" Version="4.4.5" />
<PackageVersion Include="Appium.WebDriver" Version="8.0.1" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Appium.WebDriver 8.0.1 update breaks existing test code due to removed API methods like FindElementByName() and CloseApp(), causing runtime exceptions.
Severity: CRITICAL | Confidence: 1.00

🔍 Detailed Analysis

The Appium.WebDriver package was updated to version 8.0.1, which introduced breaking changes by removing several API methods. The existing test code in tests/Files.InteractionTests/SessionManager.cs and tests/Files.InteractionTests/Helper/TestHelper.cs still attempts to use these removed methods, such as _session.FindElementByName(), _session.CloseApp(), SessionManager.Session.FindElementsByTagName(), and SessionManager.Session.FindElementByAccessibilityId(). Additionally, the WindowsDriver<WindowsElement> generic type is no longer supported. This will lead to NoSuchMethodException or MethodAccessException at runtime, causing all interaction tests to fail immediately.

💡 Suggested Fix

Update test code to use Appium.WebDriver 8.0.1 compatible APIs. Replace FindElementByName(), FindElementsByTagName(), FindElementByAccessibilityId() with findElement(By.*) or findElement(AppiumBy.*). Change WindowsDriver<WindowsElement> to AppiumDriver. Replace CloseApp() with removeApp().

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: Directory.Packages.props#L56

Potential issue: The Appium.WebDriver package was updated to version 8.0.1, which
introduced breaking changes by removing several API methods. The existing test code in
`tests/Files.InteractionTests/SessionManager.cs` and
`tests/Files.InteractionTests/Helper/TestHelper.cs` still attempts to use these removed
methods, such as `_session.FindElementByName()`, `_session.CloseApp()`,
`SessionManager.Session.FindElementsByTagName()`, and
`SessionManager.Session.FindElementByAccessibilityId()`. Additionally, the
`WindowsDriver<WindowsElement>` generic type is no longer supported. This will lead to
`NoSuchMethodException` or `MethodAccessException` at runtime, causing all interaction
tests to fail immediately.

Did we get this right? 👍 / 👎 to inform future reviews.

Reference_id: 2638027

<PackageVersion Include="Axe.Windows" Version="2.4.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="4.0.2" />
Expand Down
Loading