Control chromium kiosk mode url from python
<p><a href="http://stackoverflow.com/questions/30123632/using-python-to-start-a-browser-chromium-and-change-the-url">Using Python to start a browser (Chromium) and change the url</a></p>

<p>The linked question is asking exactly what I want but I don't know how to implement the answer that is just to uses Selenium. </p>

<p>I just need to load chromium in kiosk mode and load a local html page I have does this with <code>os.system('chromium-browser --kiosk file://.....')</code> but this loads a new window/tab every time so it's not efficient or fast</p>

<p>You can add options to selenium's chromedriver, similar to how you would using <code>os.system</code></p>

<pre><code>from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_argument("--kiosk")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("http://example.com")
</code></pre>

<p>To refresh or reload the page repeatedly, you could do <code>driver.get(url)</code> or <code>driver.refresh()</code> in a <code>while True</code> loop.</p>

python raspberry-pi