You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigate to folder location where the script will be held. Here you can also navigate in your "File Explorer", right click, select "New" and click on "Text Document". Rename the file anything you wish, but make sure to change the extention file to ".py". In this tutorial we will call it "Web Browser Automation.py".
PS > CD '.\Documents\Python\Web Browser\'
2. Create the script.
Import all dependencies that were installed in the beginning.
importwebbrowser
We'll go ahead and start an array called "links" and with the variables of links we want to open up.
Here we will assign "links_length" to be the length of our "links" array to make it easier to add/delete links.
links_length=len(links)
The following is using FireFox and Google Chrome web browsers. You can apply to any web browser by following the ".exe" file saved on your computer. Please note that to open incognito/private tabs, you will have to include the end extention. If you desire to open up normal tabs just get rid of anything after "--".
Below is the loop that grabs the aforementioned "links_length" and runs through the array called "links". Lastly you get the web browser file and open up the links above.