Skip to content

Commit

Permalink
use older appium api
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk committed Nov 13, 2023
1 parent 7118b53 commit 6594adc
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions SplunkRumWorkspace/SauceLabsTestApp/sl_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,22 @@ class IOSTests(unittest.TestCase):

def setUp(self):
currentTime = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
options = Options()
options.platform_name = 'iOS'
caps = {}

sl_file_id = sys.argv[2]

options.set_capability('appium:app', f'storage:{sl_file_id}')
options.set_capability('appium:deviceName', 'iPhone Simulator')
options.set_capability('appium:platformVersion', sys.argv[1])
options.set_capability('appium:automationName', 'XCUITest')
sauce_options = {
'name': 'SplunkRum tests' + currentTime,
'accessKey': os.environ['SAUCELABS_KEY'],
'username': os.environ['SAUCELABS_USER']
}
options.set_capability('sauce:options', sauce_options)
caps['platformName'] = 'iOS'
caps['appium:app'] = f'storage:{sl_file_id}'
caps['appium:deviceName'] = 'iPhone Simulator'
caps['appium:platformVersion'] = sys.argv[1]
caps['appium:automationName'] = 'XCUITest'
caps['sauce:options'] = {}
caps['sauce:options']['name'] = 'SplunkRum tests' + currentTime
caps['sauce:options']['accessKey'] = os.environ['SAUCELABS_KEY']
caps['sauce:options']['username'] = os.environ['SAUCELABS_USER']
url = f'https://ondemand.us-west-1.saucelabs.com:443/wd/hub'
self.driver=webdriver.Remote(url, options=options)
self.driver=webdriver.Remote(url, caps)


def tearDown(self):
self.driver.quit()
Expand Down

0 comments on commit 6594adc

Please sign in to comment.