-
-
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
Different performance between python and dotnet (firefox) #6597
Comments
Since Python is working faster than .NET and it's doing the same thing it suggests that it is not the remote end (geckodriver and Firefox) that is the issue. Could you do a test where it is purely instantiating an object and see how long that takes. Under the hood this is starting the browser and getting everything in place. If it is the same at that point then perhaps there are issues with a specific command but if we can narrow that area first then we can move from there. Ideally they should be within the same times. |
Which version of .Net are you using? There's a known performance problem with .Net Core 2, which you might be tickling in the firefox case. I'd also be interested to know how long the tests took once the browser started --- is the problem with test execution once the browser is stood up, or is it in actually creating the instance in the first place? |
So I updated the tests (see gist above) to give me the time ellapsed when the driver is up and running until the test is complete:
Also here are all requirements I took to write the tests and the environments: Requirements for Python:Python 3.6.4
Nuget packages for C#:dotnet Core 2.1 (2.1.403)
WebDriversgeckodriver v0.23.0chromedriver v2.43 |
Also I noticed that the firefox browser is very slow when you do an findElement and give that element an input (click or sendKeys). It's almost when you do test against InternetExplorer and it's slow motion. |
Yep. You’re definitely hitting the performance issue that is part of .NET Core. It doesn’t happen on Chrome, IE, or Edge, because the driver executables for each of those browsers (unlike I will attempt to resist the temptation to editorialize about the perceived slowness of the IE driver’s |
@jimevans Sorry man :) it was not intensional to post it as a rant. |
FYI: |
FYI: Firefox 66.0.5 (64-bit) Issue still remains |
The problem could be fixed in geckodriver, if the geckodriver team would listen on both the IPv4 and IPv6 loopback connections simultaneously (opening two sockets instead of one, as every other WebDriver remote-end implementation currently does).\ |
I was having a similar issue, but in C#. The answer at https://stackoverflow.com/a/57720610/8056356 solved it for me. |
Closing as the issue is with Geckodriver and Mozilla needs to fix it. From their side they can enable geckodriver to do that but the pass through to Firefox gets stuck. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Different performance between python and dotnet (firefox)
OS: Windows 10 Enterprise 2016 LTSB (Build: 1607)
Selenium Version:
3.14.1 (python) - 3.14.0 (dotnet), Visual Studio, Visual Studio Code
Browser:
Firefox
Browser Version:
63.0 64-Bit
Expected Behavior
Expected Behavior is that all Tests (with Firefox) behave the same in dotnet as in python environment.
Which they do on the execution level, but unfortunatly they behave different in performance which I don't comprehend.
Actual Behavior
Behavior in Firefox
The performance difference is big!
Example behavior in Chrome (same test)
It's basically the same (+/- some seconds).
Steps to reproduce this issue
On https://gist.github.com/xAaeEx/2da70dbdf6a55aeebd6ca7ba253341e0 you will find the Test(s) I created which opens Google search for SeleniumHQ and click on the first link.
Both tests are (almost) identical on python aswell as dotnet.
Can someone explain what is happening? Or if this is a firefox/marionette issue I should report?
If this is an issue, we should consider looking into it, as apperently many folks are using more and more dotnet to automate stuff (as am I).
The text was updated successfully, but these errors were encountered: