Hi guys,
I was trying to create a custom command that would run a script and tried to implement it using the Command() and Executor() classes (located in 'selenium-webdriver/lib/command ').
I was able to create a custom command with the Command class but couldn't run it with the Executor.
Can you give me an advise on this please?
Here's the code that I'm trying to run:
let doIt = new Command('doIt');
doIt.setParameter('remove', ()=>{
console.log("Remove func is called");
return "Some result";
});
let exec = new Executor();
let result = await exec.execute(doIt);
Thank you!