NameError: name ‘driver’ is not defined
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
exec(code, module.__dict__)File "trial.py", line 72, in <module>
last_height = driver.execute_script('return document.body.scrollHeight')
Made with Streamlit
Please give us a link to your public github repo, otherwise we can only guess.
the main file is called trila.py
is supposed to open the chrome driver and scrape data from it
Your approach will not work with Streamlit Cloud.
See my simple proof-of-concept example here as a starting point:
GitHub - Franky1/Streamlit-Selenium: Streamlit project to test Selenium running on Streamlit Cloud