I want to use the session id while creating a new WebDriver with Agouti to pass it to SauceLabs for status update.
Commands Used:
url := fmt.Sprintf("http://%s:%[email protected]/wd/hub", username, accesskey)
page,err :=agouti.NewPage(url, options)
Expect(err).NotTo(HaveOccurred())
page.Navigate(`https://qiita.com/login`)
I tried to retrieve the session ID from page.Session()
but the return type is a Bus Interface and result is Session with the *http.client
variable.
Is there any other alternative to it?, to just retrieve the session id.
The page.Session().Bus returns a type *apiSession to extract the session ID. Use of Indirect can help us return the value that *apiSession points to in this case page.Session().Bus from there we can extract the sessionID.