0

I want to open a new browser tab where I would like to run JavaScript code. Something like:

import webbrowser

webbrowser.open_new_tab('http://www.google.com')

but with a second argument which would be the JavaScript code.

Jermartyno
  • 43
  • 1
  • 7
  • Duplicate? https://stackoverflow.com/questions/12798301/python-open-browser-and-run-javascript-function –  Apr 13 '22 at 17:33
  • You can use Selenium to achieve this – ocamlx Apr 13 '22 at 17:34
  • Installed Selenium (with pip). How can I achieve this @kodwx? – Jermartyno Apr 13 '22 at 17:44
  • @Jermartyno Again. Duplicate. https://stackoverflow.com/questions/7794087/running-javascript-in-selenium-using-python –  Apr 13 '22 at 17:49
  • @Vusal I wanted to open a new tab in Firefox which I've installed myself, not in an environment for testing purposes. Is it still possible to do in a normal Firefox browser/ the one I use everyday? – Jermartyno Apr 13 '22 at 18:27

0 Answers0