-
Notifications
You must be signed in to change notification settings - Fork 29
Updated Desktop Module with NovaWindows appium driver and LLM config fixes #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…top-module-update # Conflicts: # src/Bellatrix.Desktop/components/Core/Component.DefaultActions.cs # src/Bellatrix.Desktop/settings/ExecutionSettings.cs
…experimental-desktop-driver # Conflicts: # src/Bellatrix.Core/Bellatrix.Core.csproj # src/Bellatrix.Desktop/Bellatrix.Desktop.csproj # src/Bellatrix.Desktop/components/Core/Component.cs # src/Bellatrix.Desktop/infrastructure/App.cs # src/Bellatrix.KeyVault/Bellatrix.KeyVault.csproj # src/Bellatrix.Web/Bellatrix.Web.csproj # src/Bellatrix.Web/plugins/execution/BrowserLifecyclePlugin.cs # src/Bellatrix.Web/services/DevToolsService.cs # templates/Bellatrix.API.GettingStarted/Models/Albums.cs # templates/Bellatrix.API.Tests/Models/Albums.cs # templates/Bellatrix.Desktop.Tests/TestsInitialize.cs # tests/Bellatrix.API.Tests/Models/Albums.cs
angelovstanton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check comments
| private static readonly string _serviceUrl; | ||
| private static readonly string ServiceUrl; | ||
|
|
||
| private const string CloseButtonXPath = "//Button[contains(translate(@AutomationId, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), 'close') or contains(translate(@Name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), 'close')]"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks a bit strange is it correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the way to lowercase in XPath expression, it works in the example tests. Checks for 'close' automation id or name, case-insensitive
| // TODO: Change to be ThreadLocal. | ||
| private static bool _shouldStartLocalService; | ||
| private static Process _winAppDriverProcess; | ||
| // private static Process _appiumProcess; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm using _appiumServerProcess below so this one is not needed
| throw new ArgumentException("Appium version 3.1.0 or higher is required. Please update Appium by running: npm install -g appium@latest"); | ||
| } | ||
|
|
||
| const string latestVersion = "1.2.0-preview.2"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this versionm the correct one? should we move it somewhere in the config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this will be needed only before we release the full 1.2.0 version, after that it will not be needed and will be automatically updated by appium
| Attached?.Invoke(this, new ComponentActionEventArgs(this)); | ||
| } | ||
|
|
||
| // public virtual void Detach() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we delete this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can delete it, I changed the Attach logic so that we won't need to detach the windows to attach another one
| Checking?.Invoke(this, new ComponentActionEventArgs(this)); | ||
| try | ||
| { | ||
| WrappedDriver.ExecuteScript("windows: toggle", WrappedElement); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will all of these JavaScript commands work across all desktop applications?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are appium platform-specific extensions and are implemented in NovaWindows driver.
Whether they should work or not depends on if the component implements the correct Pattern (e.g. TogglePattern). If it does not, there's a fallback to the previous method.
| { | ||
| if (ConfigurationService.GetSection<LargeLanguageModelsSettings>() == null) | ||
| { | ||
| throw new ArgumentException("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe in all of the places we need to at least use the logger instead of just calling return?
| if (ConfigurationService.GetSection<LargeLanguageModelsSettings>() == null) | ||
| { | ||
| throw new ArgumentException("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
| if (ConfigurationService.GetSection<LargeLanguageModelsSettings>() == null) | ||
| { | ||
| throw new ArgumentException("Could not load LargeLanguageModelsSettings section from testFrameworkSettings.json"); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
upgrade nuget packages
…o experimental-desktop-driver
No description provided.