When I run the test, sometimes I got the the following error:
"(node:34959) UnhandledPromiseRejectionWarning: NoSuchElementError: no such element: Unable to locate element:..."
And the test stops.
I want the test to going on and not to stop, but write a message into console.
My code now:
var one = await driver.findElement(By.xpath("//td[.='somethig']/following-sibling::td[1]/strong"));
var two = await one.getText();
await fs.appendFileSync("file.txt", two + ",");
How is it possible? Because I don't need this element, for further run. Thanks :)