Closed IamRanjeetSingh closed 2 months ago
The update modifies the UnhighlightElementAsync
method in the GingerWebDriver
class to include error handling. The previous version executed JavaScript commands without managing exceptions, while the new implementation wraps these commands in a try-catch
block. This allows for logging any errors encountered during execution, enhancing the method's reliability in asynchronous operations involving UI elements.
Files | Change Summary |
---|---|
Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/GingerWebDriver.cs |
Modified UnhighlightElementAsync to include a try-catch block for error handling and logging. |
sequenceDiagram
participant User
participant GingerWebDriver
participant JavaScriptEngine
User->>GingerWebDriver: Call UnhighlightElementAsync()
GingerWebDriver->>JavaScriptEngine: Execute JavaScript commands
alt Error Occurs
JavaScriptEngine-->>GingerWebDriver: Throw Exception
GingerWebDriver->>GingerWebDriver: Log Error
else No Error
JavaScriptEngine-->>GingerWebDriver: Success
end
GingerWebDriver-->>User: Return to User
🐇 In the code where elements gleam,
A catch was added, a wise new theme.
Errors now logged, no more fright,
As rabbits hop, we code with delight!
With every change, we bounce and play,
Stability found in a bright new way! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Thank you for your contribution. Before submitting this PR, please make sure:
Summary by CodeRabbit
Bug Fixes
Refactor