@Oleksandr Moskovko @Christopher_Graham @Craig_Baumgarten
Steps i followed :
I. Sucessfully Lanched selenium grid .
2. Started appium in one terminal.
appium --nodeconfig /Users/ctl-user/Documents/AppiumGrid\appium_node1.json -U 4d00cd7f4fca41cf -p 4744
-
Started appium in second terminal .
appium --nodeconfig /Users/ctl-user/Documents/AppiumGrid\appium_node2.json -U TA643039FJ -p 4731 -
Now run the below test in python .
import unittest
from appium import webdriver
from time import sleep
import appium
class keypadCall(unittest.TestCase):
def setUp(self):
desired_caps = {}
desired_caps[‘platformName’] = ‘Android’
desired_caps[‘platformVersion’] = ‘4.4’
desired_caps[‘deviceName’] = ‘Samsung’
desired_caps[‘uuid’] = ‘4d00cd7f4fca41cf’
desired_caps[‘app’] = ‘xxxxx’
desired_caps[‘appPackage’] = ‘xxxxxxx’
desired_caps[‘appActivity’] = ‘xxxxxx’
desired_caps[‘appWaitActivity’] = ‘.xxxxx’
self.driver = webdriver.Remote(‘http://127.0.0.1:4744/wd/hub’, desired_caps)
desired_caps1 = {}
desired_caps1['platformName'] = 'Android'
desired_caps1['platformVersion'] = '4.4'
desired_caps1['deviceName'] = 'Moto X'
desired_caps1['uuid'] = 'TA643039FJ'
desired_caps1['app'] = 'xxxxxxxxx'
desired_caps1['appPackage'] = 'xxxxxxxxx'
desired_caps1['appActivity'] = 'xxxxxxxx'
desired_caps1['appWaitActivity'] = 'xxxxxxxxx'
self.driver = webdriver.Remote('http://127.0.0.1:4731/wd/hub', desired_caps1)
def test_Call_002(self):
sleep(2)
#self.driver.swipe(20,200,39,1654)
el = self.driver.find_element_by_id('xxxxxx:id/TnC_checkBox_continue')
el.click()
el = self.driver.find_element_by_id('xxxxxxx:id/TnC_continueBtn')
el.click()
ERROR :
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : uuid
error: Trying to run a session for device ‘android’ but that device hasn’t been configured. Run config
info: [debug] Got configuration error, not starting session
info: [debug] Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Device android not configured yet
info: [debug] Error: Device android not configured yet
at Appium.configure (/usr/local/lib/node_modules/appium/lib/appium.js:247:15)
at null. (/usr/local/lib/node_modules/appium/lib/appium.js:118:10)
at Appium.start (/usr/local/lib/node_modules/appium/lib/appium.js:129:5)
at exports.createSession (/usr/local/lib/node_modules/appium/lib/server/controller.js:182:16)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at next (/usr/local/lib/node_modules/appium/node_modules/express/lib/router/route.js:110:13)
at Route.dispatch (/usr/local/lib/node_modules/appium/node_modules/express/lib/router/route.js:91:3)
at Layer.handle [as handle_request] (/usr/local/lib/node_modules/appium/node_modules/express/lib/router/layer.js:82:5)
at /usr/local/lib/node_modules/appium/node_modules/express/lib/router/index.js:267:22
at Function.proto.process_params (/usr/local/lib/node_modules/appium/node_modules/express/lib/router/index.js:321:12)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Device android not configured yet)”,“origValue”:“Device android not configured yet”},“sessionId”:null}
info: <-- POST /wd/hub/session 500 4.780 ms - 188