I am trying to change store location on a website with python and selenium. Selenium IDE addon from Firefox gives me a sequence. The sequence works within selenium IDE from Firefox but I cannot get it to work from within Python (Spyder). The element I want to click is inside a script and no tool can find an element inside a script. Beautifulsoup can not do it, neither can selenium. With the following code I try to get a product price in every store so I need to change the store (it is that yellow button in the top left corner and then the dropdown list) to every store from the dropdown list and scrape the page source for product price. But whenever I try "driver.find_element_by_" I get "Unable to locate element: "
The click sequence is recorded with Selenium IDE addon from Firefox. Or maybe there is a faster way than selenium to switch between shops and get the product price. I could not do it just with Beautifulsoup.
from selenium import webdriver
driver = webdriver.Firefox(executable_path='d:\Work\geckodriver.exe')
url = 'https://www.castorama.pl/deska-14x90x540-eslov-jodel-1-94-id-1105153.html'
driver.get(url)
driver.maximize_window()
driver.find_element_by_id("market-name").click() #Unable to locate element
driver.find_element_by_id("shop-selection-master-infostore").click()
driver.find_element_by_xpath("//div[@id='geolocation_popup_select_market_chosen']/a/span").click()
driver.find_element_by_xpath("//div[@id='geolocation_popup_select_market_chosen']/div/ul/li[2]").click()