Skip to content

remote file upload #445

Closed
Closed

Description

thank you so much for this great library. Very helpful!

I want to use the Webdriver mechanism to upload files remotely (since version 2.8). The junit fraction does it like this:

driver.setFileDetector(new LocalFileDetector())

Would that be possible in selenium2library, too. Did anybody look into that already?
The python bindings (file_detector.py) already implements this:

class LocalFileDetector(FileDetector):
    """
    Detects files on the local disk.
    """

Details here:
http://stackoverflow.com/questions/16205299/create-and-upload-a-file-on-selenium-grid

Activity

  1. just-be-dev commented on Jul 15, 2015

    @just-be-dev
    Contributor

    I'll look into it, thanks for the suggestion.

  2. just-be-dev commented on Jul 17, 2015

    @just-be-dev
    Contributor

    Have you tried just selecting the upload element and using send_keys (Input Text) with the path to the local file? It seems like the python api has some magic to facilitate that.

    https://github.com/SeleniumHQ/selenium/blob/f5b4f1c693f9598050e6f507eb1441a0b77c2943/py/selenium/webdriver/remote/webelement.py#L283-L285

  3. just-be-dev commented on Jul 17, 2015

    @just-be-dev
    Contributor

    This project has a long history with a lot of people involved. Things like this fall through the cracks from time to time.

    Thanks for testing it out though! I'll make an issue to update the documentation.

  4. just-be-dev commented on Jul 17, 2015

    @just-be-dev
    Contributor

    Also, did you just try it with choose file? I forgot that that keyword even exists, it should essentially do the same thing.

  5. just-be-dev commented on Jul 18, 2015

    @just-be-dev
    Contributor

    Cool. Sorry again about the documentation! I'm working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions