I'm working with selenium in python 3.6 using chromdedriver. I'm running the code on my ubuntu server. It's in jupyter notebooks. I'm able to connect remotely from my mac to the jupyter notebook server running on my ubuntu server by running the code below on my mac. It forwards the port the jupyter notebook server is running on on my ubuntu server.
ssh -N -f -L localhost:8888:localhost:8888 email@example.com
I then run the code below in a local web browser on my mac, and I'm able to work with the jupyter notebook:
I'm wondering if there's something similar I could do so that I could view the chrome browser that the selenium code in my jupyter notebook launches. When I run the jupyter notebook locally on my mac the code launches a chrome browser and I can watch it execute the code in each cell which is handy for debugging.
When I run it on my ubuntu server I have to add the code below to get it to work:
chrome_options.add_argument("no-sandbox") chrome_options.add_argument("--disable-extensions") chrome_options.add_argument("--headless")
This stops an actualy gui of the browser from launching, but still executes the code using chrome.
It would be really handy to be able to watch the chrome browser that gets launched by selenium step through the code, locally. Is there a way to do this? Do I need to use appache web server? Any tips are greatly appreciated.