Created
January 6, 2015 23:34
-
-
Save unclebean/35ee964c7c3b2e55e7dd to your computer and use it in GitHub Desktop.
appium python template
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
""" | |
More python client refer to https://github.com/appium/python-client | |
""" | |
import unittest | |
import os | |
from random import randint | |
from appium import webdriver | |
from time import sleep | |
class SimpleIOSTests(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Remote( | |
command_executor='http://127.0.0.1:4723/wd/hub', | |
desired_capabilities={ | |
'platformName': 'iOS', | |
'platformVersion': '8.1', | |
'deviceName': 'iPad' | |
}) | |
def tearDown(self): | |
self.driver.quit() | |
def test_allEls(self): | |
els = self.driver.find_elements_by_class_name('UIAButton') | |
sleep(100) | |
if __name__ == '__main__': | |
suite = unittest.TestLoader().loadTestsFromTestCase(SimpleIOSTests) | |
unittest.TextTestRunner(verbosity=2).run(suite) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment