I am currently utilizing JavaScript with the selenium library selenium-webdriver
.
Below is my code snippet:
var chromeCapabilities = webdriver.Capabilities.chrome();
this.driver = new webdriver.Builder()
.forBrowser('chrome')
.withCapabilities(chromeCapabilities)
.build();
.
.
.
driver.executeScript('return document.links;');
I am unsure of how to retrieve a value from the execute script function.
console.log(driver.executeScript('return document.links;'));
does not seem to be functioning.
I appreciate any assistance provided.