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.saucelabs.junit.ConcurrentParameterized; | |
| import com.saucelabs.saucerest.SauceREST; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| import java.net.MalformedURLException; |
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 usage = 'USAGE: node update_sauce_test.js <session_id> passed|failed [--rdc]' | |
| var https = require('https') | |
| args = process.argv.slice(2) | |
| # check if this is a real device test | |
| var rdc = false | |
| if (args.includes('--rdc')) | |
| { |
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
| if (process.argv.length != 4) { | |
| console.error('USAGE: update_test_status <session_id> <passed|failed>'); | |
| process.exit(1); | |
| } | |
| var request = require('request'); | |
| let real_device = true; | |
| let user = process.env.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
| const SauceLabs = require('saucelabs').default; | |
| (async () => { | |
| const api = new SauceLabs({ | |
| username: process.env.SAUCE_USERNAME, | |
| apiKey: process.env.SAUCE_RDC_ACCESS_KEY | |
| }); | |
| let session_id = '9e50bdcb-23aa-42eb-963a-ceeb15c137b7'; |
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
| const TestObject = require('testobject_api'); | |
| const api = new TestObject({ | |
| username: process.env.SAUCE_RDC_USERNAME, | |
| apiKey: process.env.SAUCE_RDC_API_KEY | |
| }); | |
| let session_id = '9e50bdcb-23aa-42eb-963a-ceeb15c137b7'; | |
| api.updateTest(session_id, {"passed": true}); |
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
| # usage: node update_sauce_real_device_test_status.js <session_id> <passed|failed> | |
| const request = require('request'); | |
| const SAUCE_USERNAME = process.env.SAUCE_USERNAME; | |
| const SAUCE_RDC_ACCESS_KEY = process.env.SAUCE_RDC_ACCESS_KEY; | |
| const BASIC_AUTH = basic_auth(SAUCE_USERNAME, SAUCE_RDC_ACCESS_KEY); | |
| const SESSION_ID = process.argv[2]; | |
| const TEST_RESULT = process.argv[3]; |
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.saucelabs.saucerest.DataCenter; | |
| import com.saucelabs.saucerest.SauceREST; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import org.junit.rules.TestName; | |
| import org.junit.rules.TestWatcher; | |
| import org.junit.runner.Description; | |
| import org.junit.runners.model.Statement; |
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 org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| import org.testng.annotations.Test; | |
| import java.lang.reflect.Method; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| public class DesiredCapabilitiesTest | |
| { |
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 io.appium.java_client.MobileBy; | |
| import io.appium.java_client.ios.IOSDriver; | |
| import org.junit.After; | |
| import org.junit.Before; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import org.junit.rules.TestName; | |
| import org.openqa.selenium.By; | |
| import org.openqa.selenium.remote.DesiredCapabilities; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; |
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
| class FindEngagement | |
| { | |
| public WebElement findEngagementWithText(String text) throws InterruptedException | |
| { | |
| List<WebElement> engagements = wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(EngagementListPage.engagements)); | |
| int timer = 0; | |
| int timeout = 30; | |
| while (timer < timeout) | |
| { |