A test case for nw.js can be found in the official NW.js documentation. The original test case is written in Python, but I attempted to recreate it in JavaScript. However, I encountered an error that made it difficult to interact with elements in the nw.exe application, which is similar to a browser.
const {Builder, By} = require('selenium-webdriver');
let driver = new Builder()
.forBrowser('chrome')
.build();
try {
await driver.get('src/views/index.html');
// Attempting to find and interact with the input box element
await driver.findElement(By.id("input")).sendKeys("San Francisco");
} finally {
await driver.sleep(1000);
await driver.quit();
}
When running the script above, I encountered the following error:
SessionNotCreatedError: session not created: Chrome failed to start: exited normally.
...
Error details here...
...
Any help would be greatly appreciated!