jeudi 29 mars 2018

how to enable file api when writing e2e tests with protractor

I am writing test case with protractor. below is the config i use

export let config: Config = {
  framework: "jasmine",
  specs: ["e2e-spec.js"],
  seleniumAddress: "http://localhost:4444/wd/hub",
  noGlobals: true,
  capabilities: {
    browserName: "chrome",
  },
  allScriptsTimeout: 200000
};

but when i try to access file api, e.g fs.write, it complain fs is undefined.

how can I enable fs module within my test case?

Aucun commentaire:

Enregistrer un commentaire