Capturing Visual Context

Automation Options with Smartling's Context Capture Chrome Extension

Detecting Automation with Existing Software

If you use browser automation software, such as Selenium, PhantomJS, or others for testing purposes, you can set up the Smartling's Context Capture Chrome Extension to integrate with your existing test scripts and take a snapshot and any point in a script.

  1. In Chrome, right-click the Chrome Extension icon and select Options
  2. Check Detect Automation.

Automation Tool

Smartling's Context Capture Chrome Extension can be automated to capture context for an entire website. The Automation Tool is only available for Application Resource Files projects.

  1. In Chrome, navigate to Chrome > Preferences > Extensions and click Options.
  2. Select Automation Tool.
  3. Drag your site’s sitemap.xml file into the marked area.
    drag.pngIn your sitemap.xml file, you can create a <url-list> node populated with a list of URLs you wish to contextualize. You can also preload your Project UID and API V1 key by adding this code at the top of your sitemap:



You can download a custom sitemap template here.

4. Set up the automation tool by completing all the following fields:

  • Project UID: Can be found on the Dashboard at Project Settings > API.
  • API Key: Can be found on the Dashboard at Project Settings > API. Note, the API Key required is the V1 key and not the V2 key.
  • Wait: Instructs the Chrome Context Capture Extension to wait X milliseconds after loading a page to take a snapshot. Use this feature if you have JavaScript that executes on loading a page.
  • Advanced: Allows you to execute custom JavaScript on each page before taking a snapshot.
  • URL Filter: Filters URLs by text. Snapshots will only be taken of URLs matching your filter text.
  • Test Mode: If checked, the Chrome Context Capture Extension will crawl the selected URLs, but will not take snapshots. You can also click test next to any URL to view a preview snapshot for that URL.

5. Click Start. The Automation Tool will capture a snapshot of each selected URL and match the snapshots to any matching strings in your project.

By default, the extension will not override existing context.

Was this article helpful?