lundi 16 avril 2018

Server side error while using Python script to open app on mobile device

Program--

from appium import webdriver

desired_caps = {} desired_caps['platformName'] = 'Android'

desired_caps['platformVersion'] = '7.0'

desired_caps['appiumVersion'] = '1.6.0'

desired_caps['deviceName'] = 'Moto'

#desired_caps['browserName'] = ''

desired_caps['name'] = 'Sample Test'

desired_caps['app'] ='Settings'

desired_caps['appPackage'] ='com.android.settings'

desired_caps['username'] = 'Akshit'

desired_caps['appActivity']='com.android.settings.Settings'

com.android.settings/com.android.settings.Settings}

self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)

Test Actions here...

driver.quit()


ERROR--

Traceback (most recent call last): File "C:\Python27\Programs\appiumTest.py", line 18, in self.driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) File "C:\Python27\lib\site-packages\appium\webdriver\webdriver.py", line 36, in init super(WebDriver, self).init(command_executor, desired_capabilities, browser_profile, proxy, keep_alive) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 92, in init self.start_session(desired_capabilities, browser_profile) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 179, in start_session response = self.execute(Command.NEW_SESSION, capabilities) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 238, in execute self.error_handler.check_response(response) File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response raise exception_class(message, screen, stacktrace) WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot read property 'forceStop' of undefined


Environment---

Appium version- 1.6.0 Windows-10 NPM version- 5.6.0

Selenium- 3.3.1

HI, I am using Windows 10. In my system only Appium(1.6.0) is working . I have tried 1.6.1, 1.7.2, 1.7.5, 1.7.0 and i have also tried installing appium like npm install -g appium --no-shrinkwrap to solve this error but it is not working. Thanks

Aucun commentaire:

Enregistrer un commentaire