Skip to content
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

[dotnet] Avoid try/catch while working with known types in Selenium Manager #12051

Merged
merged 2 commits into from
May 17, 2023
Merged

[dotnet] Avoid try/catch while working with known types in Selenium Manager #12051

merged 2 commits into from
May 17, 2023

Conversation

nvborisenko
Copy link
Member

Description

This approach is more convenient little bit.

Motivation and Context

When debugging unit tests, debugger always stops in try/catch block.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@titusfortner
Copy link
Member

The reason for the try/catch is that Selenium Manager is in beta and not fully featured, so we don't want users to get errors related to Selenium Manager, yet, because they can't do anything to fix it. We want the error message to include what they can do something about: "put drivers on path"

I think the next step is a custom Selenium Manager Error and link to how to debug problems (logging, submitting issues, etc)

@nvborisenko
Copy link
Member Author

I just reworked small piece of code, logically it still the same, but debugger is happy now. Ah, and performance of this piece became better if it's relevant.

@titusfortner
Copy link
Member

Where are potential errors getting caught, then?

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, this is a better solution than the one I coded.

@diemol diemol merged commit 69ccfe4 into SeleniumHQ:trunk May 17, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants