Coder Social home page Coder Social logo

wasiqb / coteafs-appium Goto Github PK

View Code? Open in Web Editor NEW
141.0 28.0 46.0 124.79 MB

:iphone: Wrapper Appium Framework in Java which supports Automation of Mobile and Tablet apps.

Home Page: https://wasiqb.github.io/website/projects/coteafs-appium

License: Apache License 2.0

Java 100.00%
appium appium-android appium-ios java testing appium-framework automation automation-framework android ios

coteafs-appium's Introduction

wasiqb-banner

Hi there, I'm Wasiq Amjad Bhamla ๐Ÿ‘‹

Linkedin Badge Website Badge Twitter Badge YouTube Channel Subscribers

  • ๐Ÿ”ญ Iโ€™m currently working on? ... different awesome open source projects.
  • ๐ŸŒฑ Iโ€™m currently learning? ... React and other new tools
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on? ... Any test automation related open source projects.
  • ๐Ÿ’ฌ Ask me about anything related to? ... Automation testing, techniques, and tools.
  • ๐Ÿ“ซ How to reach me: https://wasiqbhamla.github.io/website/
  • โšก Fun fact: I like playing Chess and Carrom.

๐Ÿ“Š Profile stats

Wasiq's GitHub Stats Top Langs

๐ŸŽ‰ Check out some of my repositories

ReadMe Card ReadMe Card ReadMe Card ReadMe Card

coteafs-appium's People

Contributors

mfaisalkhatri avatar wasiqb 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coteafs-appium's Issues

Log file generation.

Description

It is observed that in case of log file generation,Whenever a new Test is Run, system deletes the old log files and creates a fresh one.
In such a case, if user wants reference to old cases he has tested, he can't get as logs have already been deleted.
Hence, it is suggested to keep the old log files as it is and create a new file on every run.
Also, to overcome the name difficulty, appending Datetimestamp in the logfile name can be handy.

Environment

  • Appium server version: 1.7.1
  • Desktop OS version: Window 8.1
  • coteafs-appium version: 2.0.0.0
  • Mobile platform version: Android/4.4.2
  • Real device / simulator: Real Device

Error displayed in the console is not captured in log file.

my-log-all.log

Description

Error displayed in the console is not captured in log file.
my-error-log.log file is generated but it is blank.

Environment

  • Appium server version: 1.7.1
  • Desktop OS version: Windows 8.1
  • coteafs-appium version: 2.0.0.0
  • Mobile platform version: Android/ 4.4.2
  • Real device / simulator: Real Device

Details

Set the log_level to "ERROR" in the appium-config.yaml file and run the test.

Link to following:

##Stack Trace of the failure test:
https://gist.github.com/mfaisalkhatri/5334aa2d436f8cff23d514a0f2a2e716

my-log-main.log

Incorporate latest Appium Java client v-5.0.0 for device level actions.

Description

With release of latest version 5.0.0 of Appium Java client, it is required to implement the following behavior in the framework:

Device Level Actions:

Following are the device level actions which needs to be implemented:

Swipe Action:

The action will be on device where user can swipe in any direction for a specific distance from the center of the scree.

Zoom Action:

This action will be combined swipe action where one swipe action will move up and other will move down from the center of the screen till the specified distance.

Pinch Action:

This action will be combined swipe action where one swipe action will move down and other will move up from the center of the screen till the specified distance.

Allowed distance definition

There are four types of distance defined in the framework:

  1. QUARTER: It will move 1/4 distance from the center of the screen.
  2. HALF: It will move 1/2 distance from the center of the screen.
  3. THREE_QUARTER: It will move 3/4 distance from the center of the screen.
  4. FULL: It will move all the way to border of the screen from the center of the screen.

Element Level Actions:

Following are the element level actions which needs to be modified / added:

Tap:

This action need to be modified and to be implemented using TouchAction class.

Swipe:

This will be implemented in next release as I am figuring out the possible ways and an effective way to implement it. It's method will throw NotImplementedError.

Zoom:

This will be implemented in next release as I am figuring out the possible ways and an effective way to implement it. It's method will throw NotImplementedError.

Pinch:

This will be implemented in next release as I am figuring out the possible ways and an effective way to implement it. It's method will throw NotImplementedError.

Video recording of Tests are required.

Description

It is required to have video recording of the tests.
Video recording should get started when startRecording method is called and should get end and saved as MP4 when stopRecording method is called.

Add unit tests for the Framework for Android.

Description

It is required to add unit tests for the framework in order to ensure smooth functioning of the framework. It is needed to add unit tests using an open sourced app for Android.

UiAutomator is not supported in the framework

Description

It is suggested to provide the UiAutomator support with this framework.

Environment

  • Appium server version: 1.7.1
  • Desktop OS version: Windows 8
  • coteafs-appium version: 2.0.0
  • Mobile platform version: Android 4.4.2
  • Real device / simulator: Real Device

In config file, port should be made optional.

Description

Currently, when port is not provided in config file and external flag is OFF, then Framework throws AppiumConfigParameterNotFoundError.

Required

It is now required that when external flag is OFF and Port is not available, than Framework should use any available Port.

Zoom and pinch on elements are required.

Description

User should be able to zoom and pinch on elements.

Edit

Zoom and Pinch is only functional when Automation name is Espresso.
Same is confirmed in the issue raised for the same here.

Error while Starting Appium Server

server-1.log

Description

System displays the following error when user tries to run the Test using external: false in the config file:
"FAILED CONFIGURATION: @BeforeSuite setupSuite
com.github.wasiqb.coteafs.appium.error.AppiumServerNotStartingError: Error occured while starting Appium server"

Config file details are as follows:
servers:
android:
ip: 127.0.0.1
port: 4723
external: false

arguments:
  log_level: DEBUG
  log_time_stamp: true
  local_time_zone: true
  suppress_adb_kill_server: true

Environment

  • Appium server version: 1.7.1
  • Desktop OS version: Windows 8.1
  • coteafs-appium version: 2.0.0.
  • Mobile platform version: Android / 4.4.2
  • Real device / simulator: Real Device

Details

Check log files for more details.

ErrorLog.txt

Allow configurable logging.

Current behavior

Logging is done in fixed format and fixed number of log files are generated.

New behavior

Logging should now be configurable and the user should have more control on it

Solution

Need to incorporate coteafs-logger.

Browser Stack and Grid Integration.

Description

Browser Stack integration is required to run mobile automation tests in cloud or on Grid locally on different mobile OS platform.

No proper Exception when name is incorrect in method onElement.

Earlier, there was no custom exception in the framework which helps in identifying the problem when the name specified in method onElement does not match the name provided when creating the activity.
To handle this, we need to introduce new Exception named DeviceElementNameNotFoundException.

Unable to run the tests using Chrome browser on Android mobile.

Description

System does not allow running tests on Chrome browser in android phone.
In the config file, browser key was added with "chrome" value, and accordingly test was prepared.

Environment

  • Appium server version: 1.7.1
  • Desktop OS version: Windows 8
  • coteafs-appium version: 2.0.0
  • Mobile platform version: 4.4.2
  • Real device / simulator: Real Device

Details

Following is the test written to run the chrome browser:
@test
public void test1 () {
final MainActivity main = new MainActivity (this.device);
main.onDevice ().navigateTo ("http://www.facebook.com");
}

Exception stacktraces:

https://gist.github.com/mfaisalkhatri/d909cb936fd97308060b46d371f1b437

Require configurable delay between user actions.

Description

It is required to implement configurable delays between the following user actions:

  • Tap
  • Click
  • Swipe
  • Pinch
  • Swipe
  • long press

Also required to deprecate these methods with delay parameters.

Error "Missing artifact com.github.wasiqb.coteafs:configs:jar:${coteafs.config.version}"

Following error is displayed while project building.
"Missing artifact com.github.wasiqb.coteafs:configs:jar:${coteafs.config.version}".

Kindly do the needful.

Environment

  • Appium server version: 1.2.3
  • Desktop OS version: Windows
  • coteafs-appium version: 1.0.0.0
  • Mobile platform version: Android - 4.4.2
  • Real device / simulator: Real Device

Code To Reproduce Issue [ Good To Have ]

Build the project.
Project_Build_Error.docx

No availability to press enter key after entering search text in the search bar of the app.

Description

Test Case: Verify by pressing the Enter Key after entering search text in the search bar of the Flipkart mobile app.
Test Steps: 01. Go to Flipkart App. 02. Tap on search bar, 03. Enter Text "Note 5" and press Enter key.
Expected Output - System should allow to enter text an press "Enter" key.
Actual Output - No method is provided to press "Enter" Key.
(Screenshot of the search window is attached for more details).

Environment

  • Appium server version: 1.7.2
  • Desktop OS version: Windows 8.1
  • coteafs-appium version:2.2.0 beta1
  • Mobile platform version: Android / 4.4.2
  • Real device / simulator:Real Device

scr-20180303-175854

System should check battery health before running tests on device.

Description

System should check the battery health of the device before running tests.
If battery is less than 20%, than tests should not run and message should be logged as "Low battery, please connect to charger and re-run test".

Edit

This feature will only be supported when Automation name is UIAutomator2. Refer here for confirmation from Appium maintainers.

Switching back to webview - An unknown server-side error occurred - Original error: Unexpected token c in JSON at position 247

Description

I am getting an issue on iOS device when I switched to NATIVE view and try to back into Webview.

Environment

  • Appium server version: 1.8.0
  • Desktop OS version: Windows 10
  • Mobile platform version: 10.3.3
  • Real device : iPAD 4

Details

AppiumDriver().getContextHandles();

APPIUM LOGs:

[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/screenshot 200 2068 ms - 2024946
[HTTP]
[HTTP] --> GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/context
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: ["2b68dc2a-59d8-4925-bdd7-89d0ff51e90d"]
[debug] [XCUITest] Executing command 'getCurrentContext'
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/context 200 2 ms - 84
[HTTP]
[HTTP] --> GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/contexts
[HTTP] {}
[debug] [MJSONWP] Calling AppiumDriver.getContexts() with args: ["2b68dc2a-59d8-4925-bdd7-89d0ff51e90d"]
[debug] [XCUITest] Executing command 'getContexts'
[debug] [iOS] Getting list of available contexts
[debug] [iOS] Retrieving contexts and views
[debug] [iOS] Selecting by url: false
[debug] [RemoteDebugger] Getting WebKitRemoteDebugger pageArray: localhost, 27753
[debug] [RemoteDebugger] Sending request to: http://localhost:27753/json
[MJSONWP] Encountered internal error running command: SyntaxError: Unexpected token c in JSON at position 247
[MJSONWP] at JSON.parse ()
[MJSONWP] at WebKitRemoteDebugger.getJsonFromUrl$ (/usr/local/lib/node_modules/appium/node_modules/appium-remote-debugger/lib/webkit-remote-debugger.js:85:22)
[MJSONWP] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[HTTP] <-- GET /wd/hub/session/2b68dc2a-59d8-4925-bdd7-89d0ff51e90d/contexts 500 7 ms - 213

Java Client Error

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unexpected token c in JSON at position 247 (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'COMPUTER000117', ip: '192.168.133.60', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_91'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/admin/Desktop/IPA/TouchClassic_5.0.1.app, networkConnectionEnabled=false, databaseEnabled=false, deviceName=ipad, fullReset=true, platform=MAC, showXcodeLog=true, newCommandTimeout=300, platformVersion=10.3.1, webStorageEnabled=false, locationContextEnabled=false, automationName=XCUITest, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=d8a8f24c27769d00627929f291b15eb015e9e8c4, autoAcceptAlerts=true}]
Session ID: 2b68dc2a-59d8-4925-bdd7-89d0ff51e90d

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:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:40)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:235)
at io.appium.java_client.AppiumDriver.getContextHandles(AppiumDriver.java:562)

Screenshots on Failure of Tests

Description

Currently, Screenshots of the failed tests are not captured. It is suggested to capture the screenshots of the failed tests.

Environment

  • Appium server version:1.7.1
  • Desktop OS version: Windows 7, 8, 10.
  • coteafs-appium version: 2.0.0
  • Mobile platform version: 4.4.2/6.0.1 - Android
  • Real device / simulator: Real Device

Need support for multiple Server Arguments.

Existing Functionality

There is no support to add different server argument flags when starting server from Framework which we can do it while starting server externally.

Required

It is now required to provide support to change different server argument flags via config file.

Selenium WebDriver Integration.

Description

As a Test Engineer, I must be able to Automate all UI using same framework and coding standards. In order to achieve this goal, we need to integrate Selenium WebDriver into the framework for Desktop web app testing.

Swipe on element does not work.

Description

Swipe on Element is not working.
Please check log file for more details.

Environment

  • Appium server version:1.7.1
  • Desktop OS version:Windows 7
  • coteafs-appium version:2.1.0.
  • Mobile platform version:Android/4.4.2
  • Real device / simulator:Real Device

Details

Please provide more details or sample code to reproduce the issue, if necessary.

Code To Reproduce Issue [ Good To Have ]

SwipeElementCode - https://gist.github.com/mfaisalkhatri/dcbd12e8f42c9e28520976932c260b02
SwipeElementTest - https://gist.github.com/mfaisalkhatri/c6db24c59731c3159eba94edd6204409

Exception stacktraces:

https://gist.github.com/mfaisalkhatri/efedb531f6960abf99817f6d6834ccf5

Link to following:

Main Log file - https://gist.github.com/mfaisalkhatri/64bed9f5022ae124b2100f2d28950cd1

New Abstract class for Activity Actions needs to be added.

Description

Many activity have collection of elements which we use together to perform some action like search, add, modify, delete a record. In order to simplify the tests by abstracting the action and reducing code duplication, it is now required to add new class to abstract this behavior.

Usage

Users will now extend the newly created Action class to add their activity specific actions.

Structure of the class:

Class 1: DeviceActivityActions

This class will have 1 abstract method perform which will be implemented by the user and called in the test.
All the elements which will be interacted in the action can be added thru addElement method.

Class 2: AndroidActivityActions

This class will be abstract and will extend 1st class for simplicity.

Class 3: IOSActivityActions

This class will be abstract and will extend 1st class for simplicity.

Need to handle scenario with same screen on different devices.

Description

When same screen of same app is tested on different devices, we need to create same page object for both the devices. This needs to be handled such that same page object should work for both the devices.

Also user should be able to add different locators for different automation type and different platforms for the same element.

Allow multiple inline verification on an element.

Currently, we can perform inline verification on an element only once. We need to allow user to perform multiple inline verifications on an element in a single code statement.

Existing sample:

        login.onElement ("userName")
		.verifyThat ()
		.shouldBeEnabled ();

New change sample:

        login.onElement ("userName")
		.verifyThat ()
		.shouldBeDisplayed ()
		.shouldBeEnabled ();```

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.