'Selenium + Go - how to?
I'm starting to take a look on Selenium with Go language, but I didn't find too much info. I'm using github.com/tebeka/selenium.
In Python, I just install (pip install selenium) and code like this to open a browser:
from selenium import webdriver
driver = webdriver.Chrome(executable_path=r'./chromedriver.exe')
driver.get('http://www.hp.com')
How do I do the same in go? I'm trying this, but it does not open the browser like Python does:
package main
import (
"fmt"
"github.com/tebeka/selenium"
)
func main() {
selenium.ChromeDriver("./chromedriver.exe")
caps := selenium.Capabilities{"browserName": "chrome"}
selenium.NewRemote(caps, fmt.Sprintf("http://www.google.com", 80))
}
Is there a simple way in go to just open the browser in my machine like that 3 Python lines do? Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
