-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[🚀 Feature]: [dotnet] Road to be AOT friendly #14480
Comments
@nvborisenko, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Blocked by bazel-contrib/rules_dotnet#443 |
I’m interested in this feature for running Selenium. Often times, the roads to AOT compatibility leads to improvements across the board, even for non-AOT scenarios. |
when it will be fixed |
Fixed, waiting release soon.
Who knows potential issues... , I cannot prepare decomposed tasks to archive the goal. Our mission here is to adopt existing codebase to be ready for AOT. The technical enabler is resolved, so the list of impacted areas will be be growing so fast soon. |
@RenderMichael are you able to test the preview version of Selenium which seems is compatible with AOT (excepting CDP)? Your input would be valuable. I can share nuget package file here (built locally). |
@nvborisenko I would be happy to test out the AOT compatibility of Selenium :) |
Selenium.WebDriver.4.26.0-nightly202409202352.zip @RenderMichael This is zip, which contains nupkg inside. I built it locally, and hoping you know what to do with it. |
@RenderMichael @NCLnclNCL please don't forget to share results. Thanks guys. |
Exit: it was my error |
This was my program for the above. Completely ideomatic, no obscure Selenium features or anything. using OpenQA.Selenium.Firefox;
var options = new FirefoxOptions
{
AcceptInsecureCertificates = true,
};
using (var driver = new FirefoxDriver(options))
{
await driver.Navigate().GoToUrlAsync("https://www.google.com");
string url = driver.Url;
if (!url.Contains("google"))
{
throw new Exception("URL does not contain google: " + url);
}
}
Console.ReadKey(); |
@RenderMichael did you use nupkg file I provided above? Or you just referenced to dll from that package? |
it works very well, the file size is also very light |
@NCLnclNCL did you try it on your "production" project? Or just on simple "Hello World"? |
@nvborisenko Ah that was from a fluke antivirus mis-configuration on my part, I didn't release there was supposed to be a The |
@nvborisenko I found a few non-JSON related improvements we can make to the AOT story, I opened #14637 |
I opened an issue to improve the exception experience of what initially confused me: #14639 |
Seems success, we don't have reported issues related to json serialization. Thanks all, who participated in this. I deprioritized CDP, we are more interested in BiDi. |
I think success for this can be measured by adding |
Please no, then we will create new issue like "Road to be trimming friendly". |
AOT is a subset of trimmable (or put another way, trim-friendly is a pre-requisite of AOT-friendly) Besides, aside from JSON, I saw there were only 2 or 3 spots that need any changes |
I received a lot of issues privately related to json serialization. In major cases users used custom class and they provided an instance of it as |
Happy to contribute! I have a PR addressing every AOT concern aside from JSON. It was a lot simpler than I thought. #14637 |
Hi,do you know anything about python, i want to convert python nodriver library to c# |
Hi My current goal is to migrate my selenium project into a Native Aot application. I get errors when i start a new DevToolsSessions OpenQA.Selenium.WebDriverException: 'Unexpected error creating WebSocket DevTools session.'
I am not familie with the internals of Selenium but maybe you can tell me if my project is a lost cause or if the problems are going to be handled by some of the hard work you seem to be doing in regards to AOT ? |
|
Feature and motivation
Any consumer of Selenium library in .NET cannot use it within publishing his application as Native AOT Deployment.
The detailed affected parts are coming...
Selenium Manager ✅ v4.26
W3C WebDriver ✅ v4.26
W3C BiDi
CDP
Usage example
Create console app, publish as native AOT, it fails at runtime.
The text was updated successfully, but these errors were encountered: