Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

Uploading a file from IDE for "browse file window" in the page

$
0
0

For running an E2E test, instead of uploading from the local machine a file, I would like to add the file into the project, save it, and then set the path for the method to upload the file, and select the "Browse"+File"+"Add".

Now, I added the file to the project, created a method, but either the path is wrong, or, the api documentation is not right implemented.

        //      return this
        //     .setValue('#upload_file[type="file"]', require('path').resolve('localhost\pageObjects.js:\abc.pdf'));
                // },
 //then call the method using browser.clickOnSubmit();

I also tried this.demoTest = function (browser) {
  browser.submitForm('form.submit');
};```

Cheers

Viewing all articles
Browse latest Browse all 97371

Trending Articles