File Upload Testing in Nightwatch.js

前端 未结 3 1127
旧巷少年郎
旧巷少年郎 2020-12-05 19:22

I\'d like to reopen the question posed here and here about testing file uploading within Nightwatch.js which uses selenium.

Both links have the recommended solutio

3条回答
  •  眼角桃花
    2020-12-05 19:27

    I'm not sure why you're having these issues, maybe check to see if you are using the latest version of selenium server and nightwatch. This code works for me 100% in Chrome, Safari, Firefox, IE7/8/9/10/11 (not tested in IE6 but assume it as well).

    driver.setValue('input#fileUpload', __dirname + '\\testfile.txt')
    

提交回复
热议问题