const webdriver = require('selenium-webdriver') Ĭonst chrome = require('selenium-webdriver/chrome') ĬtChromeBinaryPath('/home/wktdev/Desktop/selenium/drivers/chrome/chromedriver') The code below is my latest attempt at cobbling together methods from around the web to make this work. const chrome = require('selenium-webdriver/chrome')Ĭonst chromeOptions = new chrome.Options()ĬtChromeBinaryPath('/usr/bin/brave-browser') I read the code below at another thread but I am not sure how to launch a browser instance using it. const chrome = require('selenium-webdriver/chrome') ĬtDefaultService(new chrome.ServiceBuilder('/usr/share/applications/sktop').build()) ![]() ![]() I found the following code online that allows me to get the exact directory of the browser I want to launch, but I do not know how to combine it with what I already have. The above script does not recognize brave so I changed forBrowser("brave) to "chrome". Let driver = await new Builder().forBrowser("brave").build() I tried a few code scripts online and at Stack overflow and nothing seems to work. ![]() I want to write a script that opens the Brave web browser. I am trying to setup a hello world app to learn Selenium.
0 Comments
Leave a Reply. |