Issue #7 resolved

Getting Session ID for SauceLabs

bthomson
created an issue

Hi Miki, thanks very much for this library! It is working splendidly.

I noticed that for some advanced SauceLabs features [1], one needs the session id from the WebDriver. It didn't seem like there was a way to get that through WebDriver's public API without calling wd.NewSession() a second time, so I ended up modifying NewRemote slightly to also return the session id [2].

Apologies if I have missed something obvious.

Thanks again!

Brandon

[1] https://saucelabs.com/docs/integration

[2]

func NewRemote(capabilities Capabilities, executor string) (WebDriver, string, error) {

    ...

    sessionId, err := wd.NewSession()
    if err != nil {
        return nil, "", err
    }

    return wd, sessionId, nil
}

Comments (3)

  1. Log in to comment