How to execute Selenium scripts on already opened browser [javascript | nodejs]

I am having a problem while executing Selenium scripts on an already opened browser in nodejs. I get some insight from other languages like java

// set the driver path- You can also use WebDriverManager for drivers
System.setProperty("webdriver.chrome.driver","E:MukeshDatachromedriver.exe");

// Create object of ChromeOptions Class
ChromeOptions opt=new ChromeOptions();

the question is that how can I add System.setProperty like functionality in nodejs in order to run nodejs script on the opened browser?

Source: Ask Javascript Questions

LEAVE A COMMENT