Giter Club home page Giter Club logo

Comments (12)

gskachkov avatar gskachkov commented on August 15, 2024 1

@rahul286

This feature already in place:
I've checked following script and it works in Chrome 39.0.2171.95 & IE 11 on my Windows 64

module.exports = {
  'fileupload' :  function (test) {
    //https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/value
    var pathToFile = 'C:\\test.txt';

    test
    .open('http://www.cs.tut.fi/~jkorpela/forms/file.html')
      .type('p input[type="text"]', 'out of there')
      .type('p input[type="file"]', pathToFile)
      .click('p + p + div input[type="submit"]')
      .wait(1000)
      .screenshot('sc1.jpg')
      .assert.text('table tr:first-child td tt').is('out of there')
      .assert.text('table tr:last-child td i').not.is('(empty)')
    .done();
  }
};

Let me know if it work for you

@asciidisco Can this approach be added to the documentation?

from dalek.

pratima21 avatar pratima21 commented on August 15, 2024

can we test for image upload with dalekjs…cuz i need to test for my project where i have to upload images and videos….

from dalek.

asciidisco avatar asciidisco commented on August 15, 2024

The possibility to add this functionality exists, at least you can set up a workflow using the available Webdriver commands that should work.

This is not an easy task (I would also love to have this in), but without 3rd party contributions, I do not believe that this will happen anytime soon.

from dalek.

pratima21 avatar pratima21 commented on August 15, 2024

Ok ….will be looking forward for this functionality on Dalekjs in future….

from dalek.

pnagele avatar pnagele commented on August 15, 2024

Voting as well for this feature. Being able to select a file from the file dialog would help tremendously.

from dalek.

zz85 avatar zz85 commented on August 15, 2024

👍 for this. if anyone wants to contribute to this feature, where does one starts looking at?

from dalek.

dmitrienkop avatar dmitrienkop commented on August 15, 2024

👍 Really need it.

from dalek.

dkullmann avatar dkullmann commented on August 15, 2024

👍

from dalek.

tenphi avatar tenphi commented on August 15, 2024

👍

from dalek.

rahul286 avatar rahul286 commented on August 15, 2024

We are evaluating pure js alternatives to selenium when I came across dalek.

File upload is core thing for app. :|

from dalek.

rahul286 avatar rahul286 commented on August 15, 2024

@gskachkov

Thanks for your answer. :-)

For now, I have decided to give theintern a try this weekend.

Is this project alive and going to get production ready soon? Ref: theintern/intern#334

from dalek.

PavelPolyakov avatar PavelPolyakov commented on August 15, 2024

So,

Is that possible to upload the file using Dalek at this very moment?
Haven't found anything in the documentation.

Does the solution from @gskachkov work? Is this an recommended way to solve the issue?

Regards,

from dalek.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.