I have a JavaScript code that I need to run on chrome console. I can upload it and run it on Chrome, but I'm trying to automate that by writing a Python script that does the same. Here is what the python script should do:
1) Take in input from the user, using Command Line arguments in python. e.g.:
python FileName.py --from www.abc.com --to www.def.com
2) Update 2 variables in said DoSomething.JS as:
var from_site = "www.abc.com"
var to_site = "www.def.com"
3) Upload the JS file to chrome and run it in console.
4) The JS file does its job and downloads something. Parse the data through python (I can do this) and run some other commands in said chrome console, all through the same script.
Is there a library I can look up in order to do this? I'm trying to run the python script locally on my laptop.