-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[🐛 Bug]: selenium seems to override _, breaking another package #12659
Comments
@stefanoborini, 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! |
Sounds like you are wrapping the Select class, which currently injects the atom you referenced instead of using an endpoint. I made a PR to address it. Not sure what your actual issue is, but maybe that will fix it. The alternative is to implement your own Select wrapping. |
I run into the same issue today. My tests fail after Selenium update with error saying that Looks like |
Ok, sounds like it isn't just To get an attribute or to check if an element is displayed, Selenium executes large chunks of JS called "atoms" using the |
Is there a public site that demonstrates this problem? Would be helpful to allow us to investigate further, though I guess we can just check what happens if we have a |
Loading UnderscoreJS via a simple script tag seems to be enough to replicate this. |
I've spent last 8h and lost 1532 hairs before I got to know about this issue. |
that change wouldn't have any impact that i can see. #12557 would potentially be more likely given that it references |
We have easy steps to reproduce it:
After these steps |
I reverted that change #12557, built locally, tested, and the issue disappeared. |
PR ready to revert the change that caused the issue: #12704 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
I am facing a very difficult debugging situation, and I'll gather as many information as I can.
We are using a package called shinyMatrix, together with an R shiny application. Everything is quite dynamic, with matrices widgets generated on the fly. We know that shinyMatrix uses, under the hood, Vue.
What I see is that if I run the test under selenium, and only under selenium, I get the following error in Chrome console
After some debugging and watch of the _ variable, I found that the following snippet of code seem to remap _ to a different function
It's quite hard to say what's going on, because it's all minified. I was able to trace down that file to verbatim code part of the ruby bindings (I am using the python bindings):
The resulting effect of the overwrite is that this function in shinymatrix is no longer able to find the lodash utility function cloneDeep:
I don't know if this is a selenium problem, a Vue problem, a shiny problem, or a shinyMatrix problem. For now the most likely culprit seems to be selenium, but I might have to investigate further if you have more information about what's going on.
How can we reproduce the issue?
Hard to reproduce without my full code, but I am using a very simple script:
The Selector and Tabset are basically classes I developed to simplify the access. In the end, they are fancy wrappers for a find_element with a By.XPATH and click(). The Tabset change should make the shinyMatrix appear, but the error actually occurs already at the point of the second selector.
Relevant log output
Operating System
macOS 13.5.1
Selenium version
selenium==4.11.2 on python 3.11
What are the browser(s) and version(s) where you see this issue?
Chrome 116.0.5845.110
What are the browser driver(s) and version(s) where you see this issue?
Downloaded by selenium
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: