2020-05-27 11:55:44 +00:00
|
|
|
package suites
|
|
|
|
|
2020-11-28 00:06:42 +00:00
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
|
2020-05-27 11:55:44 +00:00
|
|
|
// GetLoginBaseURL returns the URL of the login portal and the path prefix if specified.
|
|
|
|
func GetLoginBaseURL() string {
|
|
|
|
if PathPrefix != "" {
|
|
|
|
return LoginBaseURL + PathPrefix
|
|
|
|
}
|
|
|
|
|
|
|
|
return LoginBaseURL
|
|
|
|
}
|
2020-11-28 00:06:42 +00:00
|
|
|
|
|
|
|
// GetWebDriverPort returns the port to initialize the webdriver with.
|
|
|
|
func GetWebDriverPort() int {
|
|
|
|
driverPort := os.Getenv("CHROMEDRIVER_PORT")
|
|
|
|
if driverPort == "" {
|
|
|
|
driverPort = defaultChromeDriverPort
|
|
|
|
}
|
|
|
|
|
|
|
|
p, _ := strconv.Atoi(driverPort)
|
|
|
|
|
|
|
|
return p
|
|
|
|
}
|