The script below uses Helium to automatically extract the exchange rates from EUR to USD and from USD to JPY from the corresponding Yahoo Finance page. Once it has extracted them, it prints them on the console.

import static com.heliumhq.API.*;
import org.openqa.selenium.WebDriver;

public class ExchangeRatesExample {

    public static void main(String[] args) {
        startFirefox();
        System.out.println(getExchangeRate("EUR", "USD"));
        System.out.println(getExchangeRate("USD", "JPY"));
        killBrowser();
    }

    private static String getExchangeRate(
        String baseCurrency, String counterCurrency
    ) {
        String currencyPair = baseCurrency + counterCurrency;
        goTo(String.format(
            "http://finance.yahoo.com/q?s=%s=X", currencyPair
        ));
        return $(".time_rtq_ticker").getWebElement().getText();
    }

}
from helium.api import *

def get_exchange_rate(base_currency, counter_currency):
    currency_pair = base_currency + counter_currency
    go_to("http://finance.yahoo.com/q?s=%s=X" % currency_pair)
    return S('.time_rtq_ticker').web_element.text

start_firefox()
print get_exchange_rate("EUR", "USD")
print get_exchange_rate("USD", "JPY")
kill_browser()

To try the script for yourself, follow the few simple steps on our Getting Started page. Then, execute the script run.bat/run.sh in the examples/Exchange rates subdirectory of your Helium installation.