import time


def parse_data(driver):
    """Return a float of the current price given the driver open to the TMX page of the specific symbol."""
    # The driver needs time to load the page before it can be parsed.
    time.sleep(5)
    content_obj = driver.find_element(by="id", value="root")
    content_text = content_obj.text
    price_string = content_text.split("PRICE")[1].split("CHANGE")[0].strip()
    try:
        price_float = float(price_string.replace("$", "").replace(",", ""))
        return price_float
    except ValueError as e:
        raise e