Code Monkey home page Code Monkey logo

vodqa_mobileautomationworkshop's Introduction

Mobile Android Automation using Appium

Appium Setup in Mac OSX:

Checkout our Appium Setup for Mac OSX Installation wiki here

Appium Setup in Windows Platform:

Checkout our Appium Setup for windows Installation wiki here

vodqa_mobileautomationworkshop's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vodqa_mobileautomationworkshop's Issues

Error in verticalSwipeTest() for Android

Hello , I am trying verticalSwipe from Class GestureTest in the Project , it not able to swipe for me .

Can you help me regarding this
I have appium 1.10.1
Java Client 6.1
I am getting error on this line
"appiumdriver.perform(Arrays.asList(dragNDrop));"

Error :
Element Not Present: Please verify whether the entered element is Valid
org.openqa.selenium.UnsupportedCommandException: actions

Weird as it is able to find any all the elements.

Unable to launch Default mobile browser

My appium node is up with following config:

Starting Node Server
warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: Welcome to Appium v1.4.0 (REV 8f63e2f91ef7907aed8bda763f4e5ca08e86970a)
info: Appium REST http interface listener started on 127.0.0.1:4747
info: [debug] Non-default server args: {"address":"127.0.0.1","port":4747,"noReset":true,"logNoColors":true,"deviceName":"Samsung ","platformName":"Android","platformVersion":"18","automationName":"Selendroid","browserName":"Browser","optionalIntentArguments":"www.google.com"}

Java code(copied yours):
try {
AppiumDriver driver;
WebDriverWait wait;
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "10.4.21.140:5555");
capabilities.setCapability("platformVersion", "5.0.1");
capabilities.setCapability("browserName", "browser");
capabilities.setCapability("setJavaScriptEnabled", true);

        driver = new AndroidDriver(new URL("http://127.0.0.1:4747/wd/hub"), capabilities);
        wait = new WebDriverWait(driver, 30);
        System.out.println("launched");
        WebElement idElement = driver.findElement(By.id("mobile-menu-title"));
    } catch (MalformedURLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

We are getting the following error:

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: An unknown server-side error occurred while processing the command. (Original error: unknown error: com.android.browser is not installed on device 4d00aebfb8b9900f
(Driver info: chromedriver=2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3),platform=Windows NT 6.1 SP1 x86_64))) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 11.61 seconds
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:58'
System info: host: 'LT0022323', ip: '10.49.146.150', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_40'
Driver info: io.appium.java_client.android.AndroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:180)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:153)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:109)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:39)
at com.rjil.cloud.snw.MobileBrowser.main(MobileBrowser.java:40)

facing issue in Appium setup on Mac machine..

[info] [Appium] Welcome to Appium v1.6.5

[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> GET /wd/hub/sessions {}

[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args: []

[debug] [MJSONWP] Responding to client with driver.getSessions() result: []

[info] [HTTP] <-- GET /wd/hub/sessions 200 19 ms - 40 [info] [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/admin/Downloads/TechTool_iPhone_UAT_12.1.ipa","automationName":"XCUITest","bundleId":"com.facebook.IntegrationAppLnT1","deviceName":"LNT iPad","platformName":"iOS","platformVersion":"9.3","udid":"aded4aef9035ed81b16611ceaf9860801453022c","newCommandTimeout":0,"connectHardwareKeyboard":true}}

[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/admin/Downloads/TechTool_iPhone_UAT_12.1.ipa","automationName":"XCUITest","bundleId":"com.facebook.IntegrationAppLnT1","deviceName":"LNT iPad","platformName":"iOS","platformVersion":"9.3","udid":"aded4aef9035ed81b16611ceaf9860801453022c","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]

[debug] [BaseDriver] Event 'newSessionRequested' logged at 1528784769230 (11:56:09 GMT+0530 (IST))

[info] [Appium] Creating new XCUITestDriver (v2.30.0) session

[info] [Appium] Capabilities:

[info] [Appium] app: '/Users/admin/Downloads/TechTool_iPhone_UAT_12.1.ipa'

[info] [Appium] automationName: 'XCUITest'

[info] [Appium] bundleId: 'com.facebook.IntegrationAppLnT1'

[info] [Appium] deviceName: 'LNT iPad'

[info] [Appium] platformName: 'iOS'

[info] [Appium] platformVersion: '9.3'

[info] [Appium] udid: 'aded4aef9035ed81b16611ceaf9860801453022c'

[info] [Appium] newCommandTimeout: 0

[info] [Appium] connectHardwareKeyboard: true

[debug] [XCUITest] XCUITestDriver version: 2.30.0

[info] [BaseDriver] Session created with session id: 2915fa5c-598d-4b76-862e-2498aea5a390[debug] [XCUITest] Xcode version set to '8.1' (tools v8.1.0.0.1.1476494586)

[debug] [XCUITest] iOS SDK Version set to '10.1'

[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1528784771825 (11:56:11 GMT+0530 (IST))[debug] [XCUITest] Available devices: aded4aef9035ed81b16611ceaf9860801453022c

[debug] [XCUITest] Creating iDevice object with udid 'aded4aef9035ed81b16611ceaf9860801453022c'

[info] [XCUITest] Determining device to run tests on: udid: 'aded4aef9035ed81b16611ceaf9860801453022c', real device: true

[info] [BaseDriver] Using local app '/Users/admin/Downloads/TechTool_iPhone_UAT_12.1.ipa'

[debug] [BaseDriver] Copying local zip to tmp dir[debug] [BaseDriver] Unzipping /var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/2018512-9961-13jfqrc.92lz0k9/appium-app.zip

[debug] [BaseDriver] Testing zip archive: /var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/2018512-9961-13jfqrc.92lz0k9/appium-app.zip[info] [BaseDriver] Unzipped local app to '/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/2018512-9961-13jfqrc.92lz0k9/Payload/TechTool_UAT_12_1.app'

[debug] [BaseDriver] Event 'appConfigured' logged at 1528784774657 (11:56:14 GMT+0530 (IST))

[debug] [XCUITest] Checking whether app '/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/2018512-9961-13jfqrc.92lz0k9/Payload/TechTool_UAT_12_1.app' is actually present on file system

[debug] [XCUITest] App is present

[debug] [BaseDriver] Event 'resetStarted' logged at 1528784774661 (11:56:14 GMT+0530 (IST))

[debug] [XCUITest] Reset: running ios real device reset flow

[debug] [BaseDriver] Event 'resetComplete' logged at 1528784774662 (11:56:14 GMT+0530 (IST))

[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog[debug] [iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1528784775451 (11:56:15 GMT+0530 (IST))

[info] [XCUITest] Setting up real device[debug] [XCUITest] Reset requested. Removing app with id 'com.facebook.IntegrationAppLnT1' from the device[debug] [XCUITest] Installing '/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/2018512-9961-13jfqrc.92lz0k9/Payload/TechTool_UAT_12_1.app' on device with UUID 'aded4aef9035ed81b16611ceaf9860801453022c'...[debug] [XCUITest] The app has been installed successfully.

[debug] [BaseDriver] Event 'appInstalled' logged at 1528784791069 (11:56:31 GMT+0530 (IST))

[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1528784791073 (11:56:31 GMT+0530 (IST))

[info] [XCUITest] Using WDA path: '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'

[info] [XCUITest] Using WDA agent: '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'

[info] [XCUITest] Launching WebDriverAgent on the device

[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'

[debug] [XCUITest] Creating WebDriverAgent resources directory

[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1528784791087 (11:56:31 GMT+0530 (IST))

[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: EROFS: read-only file system, mkdir '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources'

[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying

[info] [XCUITest] Shutting down sub-processes

[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1528784802973 (11:56:42 GMT+0530 (IST))

[info] [XCUITest] Using WDA path: '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'

[info] [XCUITest] Using WDA agent: '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'

[info] [XCUITest] Launching WebDriverAgent on the device

[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'

[debug] [XCUITest] Creating WebDriverAgent resources directory

[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1528784802981 (11:56:42 GMT+0530 (IST))

[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: EROFS: read-only file system, mkdir '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources'

[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying

[info] [XCUITest] Shutting down sub-processes

[debug] [XCUITest] Removing WDA application from device[error] [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: EROFS: read-only file system, mkdir '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources'

at XCUITestDriver.quitAndUninstall$ (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)

at tryCatch (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)

at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)

at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)

at GeneratorFunctionPrototype.invoke (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

at process._tickCallback (internal/process/next_tick.js:103:7)

Error: Unable to launch WebDriverAgent because of xcodebuild failure: EROFS: read-only file system, mkdir '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources'

at XCUITestDriver.quitAndUninstall$ (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)

at tryCatch (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)

at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)

at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)

at GeneratorFunctionPrototype.invoke (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

at process._tickCallback (internal/process/next_tick.js:103:7)

[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.

[debug] [iOSLog] Stopping iOS log capture

[error] [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: EROFS: read-only file system, mkdir '/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Resources'

at XCUITestDriver.quitAndUninstall$ (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)

at tryCatch (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)

at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)

at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)

at GeneratorFunctionPrototype.invoke (/private/var/folders/_4/pw1pkl293w1f4rrqf2myh_100000gn/T/AppTranslocation/2B69B3A1-8261-4CA5-8A90-CFDE94562F2D/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)

at process._tickCallback (internal/process/next_tick.js:103:7)

[info] [HTTP] <-- POST /wd/hub/session 500 44793 ms - 465

Appium Setting

{
"platformName": "iOS",
"platformVersion": "9.3",
"deviceName": "iPad",
"automationName": "XCUITest",
"bundleId": "com.facebook.IntegrationAppLnT1",
"udid": "aded4aef9035ed81b16611ceaf9860801453022c",
"app": "/Users/admin/Downloads/TechTool_iPhone_UAT_12.1.ipa"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.