-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
4.0.0.b1 fails when testing file uploads #9201
Comments
I've just added a test for this in 4750e40 and can't recreate the issue. Are you sure the file is available where you think it is? |
The file is present. The file that gets uploaded is the Python file that contains all the tests. I don't know if it is readable by Selenium, perhaps due to permissions or something in GitHub Actions? How can I check that? |
|
@stevepiercy Are the tests running using remote or directly to geckodriver? |
@AutomatedTester remote via GitHub Actions. Please see above stacktrace for exactly where it fails. Locally with geckodriver, tests pass successfully. FWIW, I tried to install my GitHub fork of selenium with the proposed fix from @hxhappy, but I was not able to successfully install it through GitHub Actions. |
@stevepiercy you can update webelement.py in your local as below: |
@hxhappy yes, locally, that works fine. My problem was not being able to successfully install my fork of Selenium as a package into GitHub Actions, then run my project's tests. Sorry if that was not clear. |
Looking at this again I think I need a bit more info. I've added another test for uploading multiple files in 6e44d37 and that appears to be working for me. |
How are you getting it to be a tuple? It should be at worst a string or a list. If you can give me an example of how you are using it I will look into it further. |
@AutomatedTester |
Actually I think I found something. Here's an example. Note the path to the sought file is |
@hxhappy I am not sure why you're passing in a tuple but it should be a string. I think your issue is very different to @stevepiercy so let's stop muddying the water here. |
I need to verify the value of
This should output the actual value of I could also compare other package versions and dependencies, but given that the current tests pass with Is there anything else I could possibly check? I'm open to ideas. |
@stevepiercy let's try that. I can't currently think of a different way. One thing actually... Are you locally and in github actions running the tests form the same level within the git tree? It shouldn't matter since we're asking for the full path before we pass it in. |
Yes. Here's the test result on GHA:
Here is the test result locally:
The paths differ between GHA and local, of course, but the important part is that the directory from which the tests are run is:
Somewhere in the stack for GHA, the path segment |
@AutomatedTester I have reference function definitions in python document as below. If the form “*identifier” is present, it is initialized to a tuple receiving any excess positional parameters, defaulting to the empty tuple. |
I completed more testing. The filepath is correct on GHA. I did two runs, where the differences were only in the requirements for Python 3.9:
There are 4 file upload tests, and 1 test that is designed to always fail and return the filepath of the file.
For both runs, the returned file path from the deliberately failing test is the following.
I conclude that, since all other things are equal, the problem must be within Selenium >= 4.0.0.b1 or its dependencies. Those are the only differences between these two runs. Run 1 relevant dependencies
Run 2 relevant dependencies
Below is the stacktrace of just one of the file upload test failures, as they are repetitive. The only thing I don't understand in the stacktrace relates to
|
I think this issue began here: 85ae06e#diff-167af39a13c2c1c011a621b7b0f0ff5a76a6bd965a0d077e611d02de2992945cL539 I was also having problem when uploading a file and found that was the issue. I fixed it and it works OK now. |
@arnaldoanez would you please submit a PR that fixes the issue for you? @diemol I am eager to run any fix in our repo's GitHub Actions to share results with y'all. Thank you! |
@stevepiercy if you checkout the selenium repo and build the wheel with |
@AutomatedTester I have no clue how to do that in GitHub Actions. Do you have an example configuration I can reuse or adapt? If not, I'll just wait for the next beta release that includes this patch. |
Selenium 4.0.0.b4 was released today, but the file upload tests still do not pass in deformdemo's GitHub Actions. It looks like this issue is still on the To-Do column for the Selenium 4 project board and did not make the cut for this release. |
@stevepiercy, as I could see the test that fails (
I don't see any other tests failures for this particular build |
@GeyseR what would I do without you? Thank you! I completely forgot I added that deliberately failing test. Removing that test yields a fully successful build. 🎉 It guess the fix for this issue actually did make it into the release. I didn't see a change history file in the root of the repo, and I am not familiar with the release process. Apologies for my misunderstanding. Closing as resolved. |
@stevepiercy I glad that my comment helped you :) |
🐛 Bug Report
4.0.0.b1 fails when testing file uploads. This worked in 4.0.0a7.
Test script or set of commands reproducing this issue
Baseline successful build on 2021-01-28 with selenium-4.0.0a7:
https://github.com/Pylons/deformdemo/runs/1783717797?check_suite_focus=true
Failed build on 2021-02-22 with selenium-4.0.0b1:
https://github.com/Pylons/deformdemo/runs/1949937935?check_suite_focus=true
Final successful build on 2021-02-22 with selenium-4.0.0a7:
https://github.com/Pylons/deformdemo/runs/1950522237?check_suite_focus=true
Stacktrace of one of four similar test failures:
Environment
OS: Ubuntu 18.04 and 20.04 LTS
Browser: Firefox
Browser version: Selenium/Firefox
Browser Driver version: GeckoDriver 0.29.0
Language Bindings version: Python 3
Selenium Grid version (if applicable): See above
Deform and Deformdemo are open source projects. I am happy to share whatever information may be helpful to isolate the cause.
The text was updated successfully, but these errors were encountered: