0

I want to retrieve the course for different funds per day for the last 10 years, the information is available on http://www.morningstar.se/Funds/Quicktake/AdvancedCharts.aspx?perfid=0P00000M7O&programid=0000000000

I've used selenium but I can't get the elements for the dates or the price. When I run following code in debug mode and stop after the page has been loaded I can change dates with find_elements, hence not when I run it :(

from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys


class GetData:
    def __init__(self):
        self.start_page = "http://www.morningstar.se/Funds/Quicktake/AdvancedCharts.aspx?perfid=perfid=0P00000M7O&programid=0000000000"
        self.browser = webdriver.Chrome()

    def get_page(self):
        self.browser.get(self.start_page)
        time.sleep(1)
        self.browser.find_elements_by_class_name('highcharts-range-selector')[0].send_keys('2017-01-01')

So I want to change dates (1) and retrive the day and price difference (2) in this case "22 jan, 2018" and "+3.82%"

Fund course

axel_ande
  • 359
  • 1
  • 4
  • 20
  • Possible duplicate of [Selenium WebDriver \[Java\]: How to Click on elements within an SVG using XPath](https://stackoverflow.com/questions/41829000/selenium-webdriver-java-how-to-click-on-elements-within-an-svg-using-xpath) – undetected Selenium Jan 23 '18 at 06:20
  • Maybe, hence any suggestion on the xpath string? – axel_ande Jan 23 '18 at 06:47
  • The site is _nonEnglish_ . So a bit difficult to interpret. Can you sum up the `manual Step` which you are trying to `Automate`? – undetected Selenium Jan 23 '18 at 06:49
  • Sorry, I added a picture.. I want to change the dates in the boxes "Från" and "Till" and from the graph I want to retrieve the price (%).. – axel_ande Jan 23 '18 at 07:34

0 Answers0