This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require "digest/md5" | |
| require "sauce_whisk" | |
| # specify the file to upload | |
| local_file_path = "/tmp/foo.apk" | |
| # get file name and checksum to use later | |
| file_name = File.basename(local_file_path) |
This file contains hidden or 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
| package saucelabs.examples; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import java.io.File; | |
| import java.net.URL; | |
| import java.util.*; |
This file contains hidden or 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
| var should = require("chai").should(); | |
| var request = require("superagent"); | |
| var page = { | |
| url: "http://saucelabs.github.io/training-test-page/", | |
| title: "I am a page title - Sauce Labs", | |
| logo: { selector: "img:first-of-type", filename: "saucelogo.png", size: 9666 } | |
| }; | |
| describe("download file", function() { |
This file contains hidden or 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
| Set-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -name EnableNegotiate -value 0 | |
| Get-Item "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" |
This file contains hidden or 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
| import com.google.gson.Gson; | |
| import com.google.gson.reflect.TypeToken; | |
| import com.saucelabs.saucerest.SauceREST; | |
| import java.lang.reflect.Type; | |
| import java.util.List; | |
| public class SauceConnectTunnelManager | |
| { | |
| private String SAUCE_USERNAME = System.getenv("SAUCE_USERNAME"); |
This file contains hidden or 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
| $username = $(Get-ChildItem Env:SAUCE_USERNAME).value | |
| $accessKey = $(Get-ChildItem Env:SAUCE_ACCESS_KEY).value | |
| $credentials = "$username`:$accessKey" | |
| $encodedCredentials = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($credentials)) | |
| $headers = @{ Authorization = "Basic $encodedCredentials" } | |
| $sauceRestUrl = "https://saucelabs.com/rest/v1" | |
| $userEndpoint = "$sauceRestUrl/users/$username" | |
| $tunnelsEndpoint = "$sauceRestUrl/$username/tunnels" |
This file contains hidden or 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
| $credentials = Get-Credential | |
| $sauceRestUrl = "https://saucelabs.com/rest/v1" | |
| $userEndpoint = "$sauceRestUrl/users/$username" | |
| $tunnelsEndpoint = "$sauceRestUrl/$username/tunnels" | |
| $user = Invoke-WebRequest -Uri $userEndpoint -Credential $credentials | ConvertFrom-Json | |
| $tunnels = Invoke-WebRequest -Uri $tunnelsEndpoint -Credential $credentials | ConvertFrom-Json | |
| ForEach ($tunnelId in $tunnels) |
This file contains hidden or 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
| <XCUIElementTypeApplication name="TestApp"> | |
| <XCUIElementTypeOther> | |
| <XCUIElementTypeWindow> | |
| <XCUIElementTypeOther> | |
| <XCUIElementTypeTextField name="IntegerA"> | |
| <XCUIElementTypeTextField name="IntegerB"> | |
| <XCUIElementTypeButton name="ComputeSumButton"> | |
| <XCUIElementTypeStaticText name="Answer"> | |
| <XCUIElementTypeButton name="show alert"> | |
| <XCUIElementTypeButton name="contact alert"> |
This file contains hidden or 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
| public AndroidCalculator implements Calculator { //... } |
This file contains hidden or 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
| public interface Calculator { | |
| WebElement getNumberKey(); | |
| WebElement getPlusKey(); | |
| WebElement getEqualsKey(); | |
| void pressNumber(int number); | |
| void pressPlusKey(); | |
| void pressEqualsKey(); | |
| //... | |
| } |
OlderNewer