webdriver

package
v0.124.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	Framework        string              `json:"framework,omitempty"`
	FrameworkVersion string              `json:"frameworkVersion,omitempty"`
	RunnerVersion    string              `json:"runnerVersion,omitempty"`
	TestFile         string              `json:"testFile,omitempty"`
	Args             []map[string]string `json:"args"`
	VideoFPS         int                 `json:"video_fps"`
}

Batch represents capabilities for batch frameworks.

type Capabilities

type Capabilities struct {
	AlwaysMatch MatchingCaps `json:"alwaysMatch,omitempty"`
}

Capabilities represents the webdriver capabilities. https://www.w3.org/TR/webdriver/

type Client

type Client struct {
	HTTPClient  *http.Client
	URL         string
	Credentials credentials.Credentials
}

Client service

func (*Client) StartJob

func (c *Client) StartJob(ctx context.Context, opts job.StartOptions) (jobID string, isRDC bool, err error)

StartJob creates a new job in Sauce Labs.

type FrameworkResponse

type FrameworkResponse struct {
	Name       string     `json:"name"`
	Deprecated bool       `json:"deprecated"`
	Version    string     `json:"version"`
	Runner     runner     `json:"runner"`
	Platforms  []platform `json:"platforms"`
}

FrameworkResponse represents the response body for framework information.

type Job

type Job struct {
	ID    string `json:"id"`
	Owner string `json:"owner"`
}

Job represents the sauce labs test job.

type MatchingCaps

type MatchingCaps struct {
	App               string    `json:"app,omitempty"`
	BrowserName       string    `json:"browserName,omitempty"`
	BrowserVersion    string    `json:"browserVersion,omitempty"`
	PlatformName      string    `json:"platformName,omitempty"`
	SauceOptions      SauceOpts `json:"sauce:options,omitempty"`
	PlatformVersion   string    `json:"platformVersion,omitempty"`
	DeviceName        string    `json:"deviceName,omitempty"`
	DeviceOrientation string    `json:"deviceOrientation,omitempty"`
}

MatchingCaps are specific attributes that together form the capabilities that are used to match a session.

type SauceOpts

type SauceOpts struct {
	DevX             bool     `json:"devX,omitempty"`
	TestName         string   `json:"name,omitempty"`
	Tags             []string `json:"tags,omitempty"`
	BuildName        string   `json:"build,omitempty"`
	Batch            Batch    `json:"_batch,omitempty"`
	IdleTimeout      int      `json:"idleTimeout,omitempty"`
	MaxDuration      int      `json:"maxDuration,omitempty"`
	TunnelIdentifier string   `json:"tunnelIdentifier,omitempty"`
	TunnelParent     string   `json:"parentTunnel,omitempty"` // note that 'parentTunnel` is backwards, because that's the way sauce likes it
	ScreenResolution string   `json:"screen_resolution,omitempty"`
	SauceCloudNode   string   `json:"_sauceCloudNode,omitempty"`
	UserAgent        string   `json:"user_agent,omitempty"`
	TimeZone         string   `json:"timeZone,omitempty"`
	Visibility       string   `json:"public,omitempty"`
}

SauceOpts represents the Sauce Labs specific capabilities.

type SessionRequest

type SessionRequest struct {
	Capabilities        Capabilities `json:"capabilities,omitempty"`
	DesiredCapabilities MatchingCaps `json:"desiredCapabilities,omitempty"`
}

SessionRequest represents the webdriver session request.

type TokenResponse

type TokenResponse struct {
	Token string `json:"token"`
}

TokenResponse represents the response body for slack token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL