This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from vania-pooh/master
- Loading branch information
Showing
25 changed files
with
2,331 additions
and
424 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
{ | ||
"chrome": { | ||
"command": "%s --whitelisted-ips='' --verbose", | ||
"files": { | ||
"linux": { | ||
"386": { | ||
"url": "http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux32.zip", | ||
"filename": "chromedriver" | ||
}, | ||
"amd64": { | ||
"url": "http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip", | ||
"filename": "chromedriver" | ||
} | ||
}, | ||
"darwin": { | ||
"amd64": { | ||
"url": "http://chromedriver.storage.googleapis.com/2.29/chromedriver_mac64.zip", | ||
"filename": "chromedriver" | ||
} | ||
}, | ||
"windows": { | ||
"386": { | ||
"url": "http://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip", | ||
"filename": "chromedriver.exe" | ||
}, | ||
"amd64": { | ||
"url": "http://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip", | ||
"filename": "chromedriver.exe" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"firefox": { | ||
"command": "%s --host :: --log debug", | ||
"files": { | ||
"linux": { | ||
"amd64": { | ||
"url": "https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz", | ||
"filename": "geckodriver" | ||
} | ||
}, | ||
"darwin": { | ||
"amd64": { | ||
"url": "https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-macos.tar.gz", | ||
"filename": "geckodriver" | ||
} | ||
}, | ||
"windows": { | ||
"386": { | ||
"url": "https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win32.zip", | ||
"filename": "geckodriver.exe" | ||
}, | ||
"amd64": { | ||
"url": "https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-win64.zip", | ||
"filename": "geckodriver.exe" | ||
} | ||
} | ||
} | ||
}, | ||
|
||
"opera": { | ||
"command": "%s --port=4444 --whitelisted-ips='' --verbose", | ||
"files": { | ||
"linux": { | ||
"386": { | ||
"url": "https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.27/operadriver_linux32.zip", | ||
"filename": "operadriver_linux32/operadriver" | ||
}, | ||
"amd64": { | ||
"url": "https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.27/operadriver_linux64.zip", | ||
"filename": "operadriver_linux64/operadriver" | ||
} | ||
}, | ||
"darwin": { | ||
"amd64": { | ||
"url": "https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.27/operadriver_mac64.zip", | ||
"filename": "operadriver_mac64/operadriver" | ||
} | ||
}, | ||
"windows": { | ||
"386": { | ||
"url": "https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.27/operadriver_win32.zip", | ||
"filename": "operadriver_win32/operadriver.exe" | ||
}, | ||
"amd64": { | ||
"url": "https://github.com/operasoftware/operachromiumdriver/releases/download/v.2.27/operadriver_win64.zip", | ||
"filename": "operadriver_win64/operadriver.exe" | ||
} | ||
} | ||
|
||
} | ||
}, | ||
|
||
"internet_explorer": { | ||
"command": "%s", | ||
"files": { | ||
"windows": { | ||
"386": { | ||
"url": "http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_Win32_3.4.0.zip", | ||
"filename": "IEDriverServer.exe" | ||
}, | ||
"amd64": { | ||
"url": "http://selenium-release.storage.googleapis.com/3.4/IEDriverServer_x64_3.4.0.zip", | ||
"filename": "IEDriverServer.exe" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import ( | |
) | ||
|
||
var ( | ||
quiet bool | ||
quiet bool | ||
registry string | ||
rootCmd = &cobra.Command{ | ||
Use: "cm", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
var selenoidCleanupCmd = &cobra.Command{ | ||
Use: "cleanup", | ||
Short: "Remove Selenoid traces", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
lifecycle, err := createLifecycle() | ||
if err != nil { | ||
stderr("Failed to initialize: %v\n", err) | ||
os.Exit(1) | ||
} | ||
|
||
err = lifecycle.Stop() | ||
if err != nil { | ||
stderr("Failed to stop Selenoid: %v\n", err) | ||
os.Exit(1) | ||
} | ||
|
||
err = os.RemoveAll(configDir) | ||
if err != nil { | ||
lifecycle.Printf("Failed to remove configuration directory: %v\n", err) | ||
os.Exit(1) | ||
} | ||
lifecycle.Printf("Successfully removed configuration directory\n") | ||
os.Exit(0) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
var selenoidConfigureCmd = &cobra.Command{ | ||
Use: "configure", | ||
Short: "Create Selenoid configuration file and download dependencies", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
lifecycle, err := createLifecycle() | ||
if err != nil { | ||
stderr("Failed to initialize: %v\n", err) | ||
os.Exit(1) | ||
} | ||
err = lifecycle.Configure() | ||
if err != nil { | ||
lifecycle.Printf("Failed to configure Selenoid: %v\n", err) | ||
os.Exit(1) | ||
} | ||
os.Exit(0) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
var selenoidDownloadCmd = &cobra.Command{ | ||
Use: "download", | ||
Short: "Download Selenoid latest or specified release", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
lifecycle, err := createLifecycle() | ||
if err != nil { | ||
stderr("Failed to initialize: %v\n", err) | ||
os.Exit(1) | ||
} | ||
err = lifecycle.Download() | ||
if err != nil { | ||
lifecycle.Printf("Failed to download Selenoid release: %v\n", err) | ||
os.Exit(1) | ||
} | ||
os.Exit(0) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
var selenoidStartCmd = &cobra.Command{ | ||
Use: "start", | ||
Short: "Start Selenoid", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
startImpl(force) | ||
}, | ||
} | ||
|
||
func startImpl(force bool) { | ||
lifecycle, err := createLifecycle() | ||
lifecycle.Force = force | ||
if err != nil { | ||
stderr("Failed to initialize: %v\n", err) | ||
os.Exit(1) | ||
} | ||
err = lifecycle.Start() | ||
if err != nil { | ||
lifecycle.Printf("Failed to start Selenoid: %v\n", err) | ||
os.Exit(1) | ||
} | ||
os.Exit(0) | ||
} |
Oops, something went wrong.