How to run Selenium tests on the Brave web browser?

后端 未结 4 2296
天命终不由人
天命终不由人 2020-12-29 10:25

I am trying to run some Selenium tests on the Brave web browser. I am able to start the Brave web browser through Selenium by using the ChromeDriver. However, nothing else w

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 11:03

    Thanks, @BarneyKelly, works like a charm! In python3 (Linux Mint 2020) I used:

    def abre_navegador(self):
        # Avenue_Basico.wd = webdriver.Firefox()   # Criar instância do navegador 
        # Avenue_Basico.wd = webdriver.Chrome()   # Criar instância do navegador
    
        options = Options()
        options.binary_location = '/usr/bin/brave-browser'
        driver_path = '/usr/local/bin/chromedriver'
        self.wd = webdriver.Chrome(options = options, executable_path = driver_path)
    

    Again, Thank You for your help.

提交回复
热议问题