I am trying to use the vivaldi browser with Selenium. It is a chromium browser that runs very similar to chrome. I have Selenium working with Firefox (geckodriver), and Google Chrome(chromedriver), but I can't seem to find a way with Vivaldi. Any help would be appreciated.
Through WebDriver, Selenium supports all major browsers on the market such as Chrome/Chromium, Firefox, Internet Explorer, Edge, and Safari. Where possible, WebDriver drives the browser using the browser's built-in support for automation.
To make Python Selenium interact with an existing browser session, we open the driver and the connect to the session with the given session ID.
We can open the Chrome browser with the help of the web driver package from the Selenium framework. To do this, we need to install python and import the selenium and web driver package.
We can connect to an already open browser using Selenium webdriver. This can be done using the Capabilities and ChromeOptions classes. The Capabilities class obtains the browser capabilities with the help of the getCapabilities method.
For future reference: to make Vivaldi work with selenium you need to make sure of three things : The correct version of ChromeDriver Set selenium's driver to use Vivaldi's binary via webdriver.ChromeOptions() Make sure you're getting the correct url (don't forget "https://")
To make it such that each window was its own session, and support a persistent association between the windows & saved sessions, Vivaldi would need to completely scrap Chromium's existing session code and build it all from scratch. It's a different design paradigm and they're not compatible.
We can use Selenium with Chromium browser. Prior to working with Chrome with Selenium, we should have the Java JDK, a Java IDE and Selenium webdriver configured in our system. Then, we must download the chromodriver.exe file and set it up in our project with the below steps β
We often get asked about the relationship between Vivaldi and Google Chrome. The truth is, while we rely on the Chromium engine (maintained by the Chromium project set up by Google), this is where similarities end. Letβs take a look. Vivaldi launched in 2015 to make up for the loss of features in other browsers.
If the vivaldi binary by default is located at C:\Users\levir\AppData\Local\Vivaldi\Application\vivaldi.exe
you can use the following solution:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument("start-maximized")
options.binary_location=r'C:\Users\levir\AppData\Local\Vivaldi\Application\vivaldi.exe'
driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe', options=options)
driver.get('http://google.com/')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With