- ACCESSIBILITY ID
- CLASS NAME
- IOS PREDICATE STRING
- IOS CLASS CHAIN
- XPATH
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
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.annotations.SerializedName; | |
import java.util.List; | |
public class SauceTestInfo | |
{ | |
private static Gson gson = new GsonBuilder().create(); |
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
import com.saucelabs.saucerest.SauceREST; | |
import org.junit.After; | |
import org.junit.Test; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import static org.assertj.core.api.Assertions.assertThat; |
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
import org.testng.annotations.DataProvider; | |
import org.testng.annotations.Test; | |
import static org.assertj.core.api.Assertions.assertThat; | |
public class AdditionWithDataProvider | |
{ | |
@Test(dataProvider = "additionParameters") | |
public void testAddition(int a, int b, int sum) | |
{ |
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
#!/usr/bin/env python | |
from time import sleep | |
from selenium import webdriver | |
sites = ['https://google.com', 'https://bing.com', 'https://duck.com'] | |
interval = 60 #seconds | |
iterations = 10 #times |
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
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class FindByText | |
{ | |
URL url = new URL("https://ondemand.saucelabs.com/wd/hub"); | |
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
//... set capabilities; | |
@Test |
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
PORT=${1:-4447} | |
echo $TESTOBJECT_USERNAME | |
echo $SAUCECONNECT_API_KEY | |
sc -u $TESTOBJECT_USERNAME -k $SAUCECONNECT_API_KEY \ | |
-x https://us1.api.testobject.com/sc/rest/v1 \ | |
-B all \ | |
-i my_rdc_tunnel \ | |
--se-port $PORT \ | |
--logfile /tmp/sc.$PORT.log \ |
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
FILE=$1 | |
FILENAME=$(basename $FILE) | |
if [ ! -f $FILE ]; then | |
echo "need to specify FILE: $FILE" | |
fi | |
URL="https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/$FILENAME?overwrite=true" | |
curl -s -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY -X POST -H "Content-Type: application/octet-stream" $URL --data-binary @$FILE |
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
import com.saucelabs.saucerest.SauceREST; | |
import org.junit.Test; | |
import org.openqa.selenium.logging.LogEntries; | |
import org.openqa.selenium.logging.LogType; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import java.net.MalformedURLException; | |
import java.net.URL; |
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
package com.saucelabs.test.results; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.mashape.unirest.http.HttpResponse; | |
import com.mashape.unirest.http.Unirest; | |
import com.mashape.unirest.http.exceptions.UnirestException; | |
import com.mashape.unirest.request.HttpRequest; | |
import io.restassured.path.json.JsonPath; |
NewerOlder