Giter Site home page Giter Site logo

tvarchive / appiumdemo Goto Github PK

View Code? Open in Web Editor NEW
44.0 44.0 51.0 35.74 MB

Try Optimus, the most advanced open source mobile test automation framework. The AppiumDemo repo is not being actively maintained. It was created to demonstrate a basic framework setup using Appium. It uses Flipkart android application, which is bundled along with and is present in the "apps" folder. The code is tested on this version of Flipkart app and works well to show the concepts.

Home Page: http://www.testvagrant.com/optimus

Java 100.00%

appiumdemo's People

Contributors

nishantverma avatar sukesh15 avatar

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  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

appiumdemo's Issues

(firefox) org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session.

1554126801219 mozrunner::runner INFO Running command: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\Users\KPENDU~1.ORA\AppData\Local\Temp\rust_mozprofile.qQaIiX4JAaFt"
1554126804285 Marionette INFO Listening on port 60755
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{marionette=true, browserName=firefox, moz:firefoxOptions=org.openqa.selenium.firefox.FirefoxOptions@42d8062c, version=, platform=ANY, firefox_profile=org.openqa.selenium.firefox.FirefoxProfile@6043cd28}], required capabilities = Capabilities [{}]
Build info: version: '3.2.0', revision: '8c03df6', time: '2017-03-02 09:34:51 -0800'
System info: host: 'KPENDURT-LAP', ip: '10.191.227.106', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:293)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:272)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:267)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:130)
at firstTest.FirstTestCase.main(FirstTestCase.java:17)

setUp(scenarios.AppiumTest): A new session could not be created.

Hi,

I am trying to execute the flipkart sample project and I am getting the below error:

setUp(scenarios.AppiumTest): A new session could not be created. (Original error: Bad app: D:\MyProject\apps\Flipkart.3.0.apk. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: Error: Error locating the app: ENOENT, stat 'D:\MyProject\apps\Flipkart.3.0.apk') (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 322 milliseconds
Build info: version: '2.46.0', revision: '61506a4624b13675f24581e453592342b7485d71', time: '2015-06-04 10:22:50'
System info: host: 'NODE211', ip: '192.168.47.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: io.appium.java_client.android.AndroidDriver

Please help to resolve it.Thanks

Session Not created Exception

I am getting the below error:

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=C:\myWork\development\AppiumDemo\apps\xfinityhome-tps-release-8.22.0.822000__1_.apk, appPackage=com.tps.android, appium-version=1.0, platformVersion=7.0, platformName=Android, deviceName=Samsung Galaxy S7}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'DESKTOP-O4O9ND2', ip: '10.0.0.12', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_112'
Driver info: driver.version: AndroidDriver
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:91)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:141)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:141)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:36)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:92)
at scenarios.AndroidSetup.prepareAndroidForAppium(AndroidSetup.java:22)
at scenarios.AppiumTest.setUp(AppiumTest.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:510)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:211)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:170)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:104)
at org.testng.TestRunner.privateRun(TestRunner.java:774)
at org.testng.TestRunner.run(TestRunner.java:624)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:359)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:354)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:312)
at org.testng.SuiteRunner.run(SuiteRunner.java:261)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1191)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
at org.testng.TestNG.run(TestNG.java:1024)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

I think I have the incorrect package name and appActivity. Could you please let me know what is incorrect in this and how can i correct this

How to long press on android record button(during chta) for a particular time duration

I have tried 2 ways but both are not working at all, those are:

Way 1:

By pressRecBtn = By.id("recorderButton");
int x = 353; // x coordinate of device screen, get it after enabling the Show touch and Pointer location from developer option
int y = 980; // same as x
int timeInMs = 4000;
Action.longPress(driver.findElement(pressRecBtn)).longPress(x, y, timeInMs).perform();

Way2:

By pressRecBtn = By.id("recorderButton");
int timeInMs = 4000;
Action.longPress(driver.findElement(pressRecBtn)).waitAction(timeInMs).perform();

for this way its press on rec button but for a default time(>=1000 MS).

driver.findElement(By.name("Home")).click();

org.openqa.selenium.InvalidSelectorException: Locator Strategy 'name' is not supported for this session (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/invalid_selector_exception.html

I understood that By.name is deprecated can you provide new code for that?

And can you please provide an example for doing Parallel Android Tests?
Thanx

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.