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
file_name = ARGV[0] | |
proposed_name = ARGV[1] || file_name.gsub(' ', '_') | |
`curl -u #{ENV['SAUCE_USERNAME']}:#{ENV['SAUCE_ACCESS_KEY']} \ | |
-X POST \ | |
-H "Content-Type: application/octet-stream" \ | |
https://saucelabs.com/rest/v1/storage/#{ENV['SAUCE_USERNAME']}/#{proposed_name}?overwrite=true \ | |
--data-binary @'#{file_name}'` | |
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
@Test | |
public void verifyCommentInputTest() throws InvalidElementStateException { | |
long startTime = System.nanoTime(); | |
for (int i = 1; i < 3; i++) { | |
WebElement x = driver.findElementByAccessibilityId("TextField1"); | |
x.clear(); | |
x.sendKeys("12"); | |
x = driver.findElementByAccessibilityId("TextField2"); |
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
require 'rspec' | |
require 'capybara/rspec' | |
require 'appium_capybara' | |
Capybara.register_driver(:appium) do |app| | |
opts = { | |
:caps => { | |
:platformName=>"ios", | |
:deviceName=>"iPad Air Simulator", | |
:platformVersion=>"9.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
require 'rspec' | |
require 'capybara/rspec' | |
require 'appium_capybara' | |
Capybara.register_driver(:appium) do |app| | |
opts = {:caps=>{:platformName=>"ios", :deviceName=>"iPad Air Simulator", :platformVersion=>"9.3", :browserName=>"Safari"}, :appium_lib=>{:sauce_username=>"YOUR_SAUCE_USERNAME", :sauce_access_key=>"YOUR_SAUCE_ACCESS_KEY"}} | |
Appium::Capybara::Driver.new app, opts | |
end | |
Capybara.default_driver = :appium |
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
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
// set desired capabilities to launch appropriate browser on Sauce | |
capabilities.setCapability(CapabilityType.BROWSER_NAME, "firefox"); | |
capabilities.setCapability(CapabilityType.VERSION, "latest"); | |
capabilities.setCapability(CapabilityType.PLATFORM, "Windows 7"); | |
capabilities.setCapability("name", "sample test name"); | |
FirefoxProfile firefoxProfile = new FirefoxProfile(); | |
firefoxProfile.setPreference("extensions.blocklist.enabled", false); |
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 os | |
import unittest | |
from appium import webdriver | |
class TestClass(unittest.TestCase): | |
def setUp(self): | |
caps = {} | |
caps['browserName'] = "" | |
caps['appiumVersion'] = "1.6" |
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
setUserCookie(); // will obtain unique user and inject cookie into browser | |
TDMUtils.setCart({ | |
creditCardAlwaysPass: 0, | |
item: "Samsung S8" | |
}); | |
CartPage.visit(); | |
CartPage.checkOut(); |
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 jenkins | |
import re | |
server = jenkins.Jenkins('http://ci.saucelabs-sales.net/', username='YOUR_JENKINS_USERNAME', password='YOUR_JENKINS_PASSWORD') | |
user = server.get_whoami() | |
version = server.get_version() | |
jobs = server.get_jobs() | |
for job in jobs: | |
name = job['fullname'] |
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
#!/bin/bash | |
NAME=demo_test_name | |
IMAGE=ndmanvar/demo_test | |
docker pull $IMAGE | |
docker stop $NAME || echo "Container was not running. No need to stop..." | |
docker rm -v $(docker ps -a -q -f status=exited) | |
docker run -p 8000:8000 --name $NAME -d $IMAGE |
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
'use strict'; | |
var events = require('events'); | |
var util = require('util'); | |
var timeoutReq = require('timed-out'); | |
var http = require('http'); | |
var https = require('https'); | |
function Transport() {} |