Commit a51d1da8 authored by Douglas's avatar Douglas

jstestnode: adding support for remote desktop OSes

parent 92235fb7
......@@ -82,13 +82,20 @@ def main():
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
##########################
# Run all tests
##########################
is_appium = False
if args.target == 'firefox':
firefox_binary = webdriver.firefox.firefox_binary.FirefoxBinary(firefox_path=FIREFOX_EXECUTABLE)
browser = webdriver.Firefox(firefox_binary=firefox_binary)
else:
elif args.target in ['iOS', 'Android']:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
is_appium = True
capabilities = {
'platformName': args.target,
'platformVersion': args.target_version,
......@@ -96,6 +103,16 @@ def main():
'browserName': args.target_browser
}
elif 'Windows' in args.target or 'OS X' in args.target:
# parameters for mobile emulators have different names then parameters for
# desktop OSes
is_appium = True
capabilities = {
'browserName': args.target_browser,
'platform': args.target,
'version': args.target_version
}
if is_appium:
if not args.appium_server_auth:
raise RuntimeError('--appium_server_auth is required.')
appium_url = "http://%s@ondemand.saucelabs.com/wd/hub" % (args.appium_server_auth)
......@@ -118,8 +135,6 @@ def main():
body = etree.fromstring(browser.page_source.encode('UTF-8'), html_parser)
browser.quit()
browser.title.encode('UTF-8')
print ' '.join(body.xpath('//*[@id="qunit-testresult"]//text()'))
for elt in body.xpath('.//ol[@id="qunit-tests"]/li'):
......
......@@ -107,7 +107,7 @@ mode = 0644
[template-runTestSuite]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/runTestSuite.in
md5sum = da89bddca28899023b67eb9757cb94f4
md5sum = 67e619ee48f11292f44b9c3e5e7861ce
output = ${buildout:directory}/runTestSuite.in
mode = 0644
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment