Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

FAQs

...

Specific

Link Extraction script example


Code Block
languagegroovy
titleLink Extraction
linenumberstrue
// Available variables:
// WebDriver driver, selenium driver instance, can manipulate the page at will
// List<String> discoveredUrls, insert all the URLs to process here
// ALogger logger, aspire logger, for debug purposes

// Get a list of all the <a /> elements 
driver.findElements(By.tagName("a")).each { item ->
    String link = item.getAttribute("href");
    
    if (link == null || link == "")
        link = url.getAttribute("src");
    
    
    logger.info("Current url %s, discovered %s", driver.getCurrentUrl(), link);
    
    discoveredUrls.add(link);
}

logger.info("Current url %s, discovery complete", driver.getCurrentUrl());


General 

Include Page
aspire30:Connectors FAQ & Troubleshooting
aspire30:Connectors FAQ & Troubleshooting

...