0

I'm trying to write code for testing purposes to simulate file uploading. I'm using for this purposes Selenium/Webdriver framework WebdriverIO which is also running in Browserstack.

It's working perfectly in Win & Mac with Chrome/Firefox/IE10/IE11. But NOT working in Win10 EDGE & Mac Sierra\El Capitan\Yosemite\Mavaricks with Safari. In some browsers like Opera, Safari on Win are stopping work. But above mentioned browsers are proceed with even not selecting file but as a result I'm getting an failed test results.

Here's fragment of code:

browser
  .chooseFile("#qunit-fixture-visible input[type=file]", test_file_path, function (err) {
    assert.isNull(err, "Error, selecting file");
  })
  .click('button#upload-button', function(err){
    assert.isNull(err, "File upload button can't be clicked");
  });

Here is similar question I could found for Safari. As I could understood it wasn't be able to upload file for 4-March-2016 with selenium-webdriver https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/4220

sambua
  • 2,274
  • 3
  • 22
  • 20
  • Can you try running the tests with 'verbose' logging on? I'm guessing this is a Selenium issue with those specific browsers, not related to WebdriverIO. Seeing the logs from Selenium will help pinpoint that. http://webdriver.io/guide/getstarted/configuration.html#logLevel – Kevin Lamping Dec 09 '16 at 15:56
  • @klamping thanks for comment. I'm also thinking it's selenium-webdriver related issue, I've mentioned webdriveIO here because someone who look to code will not be confused. Log will not give any useful information, I'm looking playback from browserkit and see that issue raising because browser not selecting file itself, after some period just press upload button and continue. – sambua Dec 09 '16 at 20:18

0 Answers0