-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Unable to run CefSharp.OffScreen from tests #2900
Comments
Duplicate #351 This is a limitation of Visual C++ |
Nunit's console runner works using |
The funny thing is, when I use the NETCore3 version, it works from xUnit tests. Unfortunately I can't use it in my case, because the website I need to remote control includes a file upload which I have to automate using UIAutomation. |
.Net Core doesn't support creating additional AppDomains as per https://docs.microsoft.com/en-us/dotnet/core/porting/net-framework-tech-unavailable#appdomains Any test framework that supports .Net Core should be usable with CefSharp when run from .Net Core. |
I have patched Nunit v2 to run unit tests in a single app-domain to make it compatible with CEF & Test Explorer. No console runner required, make sure CEF .dlls copy to output dir. Feel free to use it or use its code to patch an existing runner. No warrenty. |
It's possible to use The CefSharp.Test project was recently updated to demo this. A few custom classes are required, all Additional Libraries used
Code links with
|
Good to know! This info should be part of an intro guide to help others. No integrated testing was a deal-breaker for me - ive been running the patched runner for a few years and decided to post it up to make the story better. |
A link to your It's something others might also be interested in contributing to, maintaining an active fork and keeping up to date.
Anyone with a |
I turned a dead-end into an option for someone. Now with your contribution, thats 2 options. Sounds like I have done my part to further the community. This is how communities used to work before enterprises monitised them. |
75.1.142.0
Both
Windows 10 x64
WinForms
,WPF
orOffScreen
?OffScreen
x86
orx64
CefSharp.OffScreen
XUnit
dependencies:ReproduceCrash.Reproduce();
toProgram.cs
ReproduceCrash.Reproduce()
methodDebug
modeProgram.cs
When running the test, I expect that I can single-step through the method without any problems, but when it comes to the line
I get this:
When running the
Program.cs
directly, it works.The text was updated successfully, but these errors were encountered: