Giter Site home page Giter Site logo

webdriverio / native-demo-app Goto Github PK

View Code? Open in Web Editor NEW
80.0 80.0 28.0 7.76 MB

Guinea pig app for showcasing test automation with WebdriverIO and Appium

License: MIT License

JavaScript 1.70% Objective-C 3.42% Ruby 3.43% TypeScript 83.68% Kotlin 5.41% Objective-C++ 2.36%

native-demo-app's Introduction

Stand With Ukraine

WebdriverIO

Next-gen browser and mobile automation test framework for Node.js.

Build Status Package Health OpenSSF Best Practices
Support Channel Issue Resolution time Open issues


Homepage | Developer Guide | API Reference | Contribute | Changelog | Roadmap


WebdriverIO is a test automation framework, for e2e as well as unit and component testing in the browser, that allows you to run tests based on the WebDriver and WebDriver BiDi as well as Appium automation technology. It provides support for your favorite BDD/TDD test framework and will run your tests locally or in the cloud using Sauce Labs, BrowserStack, TestingBot or LambdaTest.

๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ‘จโ€๐Ÿ’ป Contributing

Do you like WebdriverIO and want to help make it better? Awesome! Have a look into our Contributor Documentation to get started and find out what contributions can be and how to make them.

Getting started with GitHub Codespaces

To get started, create a codespace for this repository by clicking this ๐Ÿ‘‡

Open in GitHub Codespaces

A codespace will open in a web-based version of Visual Studio Code. The dev container is fully configured with the software needed for this project.

Note: Dev containers are an open spec that is supported by GitHub Codespaces and other tools.

Getting started with Gitpod

You can also just click on:

Open in Gitpod

to get a ready-to-use development environment for you to start working on this code base.

If you're looking for issues to help out with, check out the issues labeled "good first pick". You can also reach out to our Matrix Channel if you have questions on where to start contributing.

๐Ÿข WebdriverIO for Enterprise

Available as part of the Tidelift Subscription.

The maintainers of WebdriverIO and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open-source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

๐Ÿ“ฆ Packages

This repository contains some of the core packages of the WebdriverIO project. There are many wonderful curated resources the WebdriverIO community has put together.

Did you build a WebdriverIO service or reporter? That's awesome! Please add it to our configuration wizard and docs (e.g. like in this example commit) as well as to our awesome-webdriverio list. Thank you! ๐Ÿ™ โค๏ธ

Core

  • webdriver - A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol
  • webdriverio - Next-gen browser and mobile automation test framework for Node.js
  • @wdio/cli - A WebdriverIO testrunner command line interface

Helper

  • @wdio/config - A helper utility to parse and validate WebdriverIO options
  • @wdio/logger - A helper utility for logging WebdriverIO packages
  • @wdio/protocols - Utility package providing information about automation protocols
  • @wdio/repl - A WDIO helper utility to provide a repl interface for WebdriverIO
  • @wdio/reporter - A WebdriverIO utility to help report all events
  • @wdio/runner - A WebdriverIO service that runs tests in arbitrary environments
  • @wdio/utils - A WDIO helper utility to provide several utility functions used across the project
  • @wdio/globals - A WDIO helper utility for importing global variables directly

Reporter

Services

  • @wdio/appium-service - A WebdriverIO service to start & stop Appium Server
  • @wdio/browserstack-service - A WebdriverIO service that can be used to use BrowserStack Test Observability which is a reporting, debugging, and test suite quality tracking tool for any test running anywhere. The service also helps for a better integration with the BrowserStack grid if you're running tests on the grid.
  • @wdio/devtools-service - A WebdriverIO service that allows you to run Chrome DevTools commands in your tests
  • @wdio/firefox-profile-service - A WebdriverIO service that lets you define your Firefox profile in your wdio.conf.js
  • @wdio/sauce-service - A WebdriverIO service that provides a better integration into Sauce Labs
  • @wdio/shared-store-service - A WebdriverIO service to exchange data across processes
  • @wdio/testingbot-service - A WebdriverIO service that provides a better integration into TestingBot

Runner

Framework Adapters

Others

๐Ÿค Project Governance

This project is maintained by awesome people following a common set of rules and treating each other with respect and appreciation.

๐Ÿ‘จโ€๐Ÿณ ๐Ÿ‘ฉโ€๐Ÿณ Backers

Become a backer and show your support for our open-source project.

๐Ÿ’ธ Sponsors

Does your company use WebdriverIO? Ask your manager or marketing team if your company would be interested in supporting our project. Support will allow the maintainers to dedicate more time to maintenance and new features for everyone. Also, your company's logo will show on GitHub - who doesn't want a little extra exposure? Here's the info.

๐Ÿ’Ž Premium Sponsor

We are immensely grateful to our exclusive Premium Sponsor for their invaluable support in the development of this project:

BrowserStack ย  ย  ย  Sauce Labs

๐Ÿฅˆ Silver Sponsor

Lambdatest

๐Ÿฅ‰ Bronze Sponsor

Eslint

๐Ÿ“„ License

MIT

FOSSA Status

๐Ÿ”ฐ Badge

Show the world you're using webdriver.io โ†’ tested with webdriverio

GitHub markup
[![tested with webdriver.io](https://img.shields.io/badge/tested%20with-webdriver.io-%23ea5906)](https://webdriver.io/)
HTML
<a href="https://webdriver.io/">
    <img alt="WebdriverIO" src="https://img.shields.io/badge/tested%20with-webdriver.io-%23ea5906">
</a>

๐Ÿ‘ Supporters

Stargazers repo roster for WebdriverIO Forkers repo roster for WebdriverIO

Animated footer bars


Back to top

native-demo-app's People

Contributors

christian-bromann avatar dependabot[bot] avatar seanpoulter avatar wdio-bot avatar wswebcreation 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

Watchers

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

native-demo-app's Issues

iOS 16.4 Fails to get webview context

Environment (please complete the following information):
JDK 11.0.2
Appium 2.0.0-rc.3
appium-java-client 8.5.1
appium xcuitest driver 4.32.5
selenium-java 4.9.1
Node v18.16.0
NPM 9.6.7
macOS Ventura 13.4
XCode 14.3
iPhone 14 (iOS 16.4 simulator)

Describe the bug
Launching the Demo app on iOS 16.4 simulator and Clicking on WebView.
Appium Inspector fails to switch to WebView and does not load the webview context.
Also in the commands tab, if you execute the Get Context List command, then the webview is not detected.

I have also tried to get the webview context with Appium Java client code, but it also does not find the webview context.

IOSDriver driver = (IOSDriver)DriverManager.getDriver();

System.out.println("Current context " + driver.getContext());
System.out.println("Current available contexts " + driver.getContextHandles());

driver.findElement(AppiumBy.accessibilityId("Webview")).click();
Thread.sleep(10000);
System.out.println("handles " + driver.getContextHandles());



Set<String> handles = driver.getContextHandles();
for (String contextName : handles) {
    System.out.println(contextName); //prints out something like NATIVE_APP \n WEBVIEW_1
}

It only prints the NATIVE_APP as detected context and available contexts.
attached you will also find the server logs.
appium-server-logs.txt

Screenshots
If you run the above code on iOS 16.2 simulator then you get the webview context also WEBVIEW_25733.3
With iOS 16.2, Appium Inspector can successfully switch context to WebView.
Screenshot 2023-06-21 at 10 50 56

But with iOS 16.4 Appium Inspector is unable to switch to WebView.

Additional context
There is a thread ongoing on Appium discussion forum that suggests new properties to be set by developers in code to make the webview context switching possible with iOS 16.4 and higher.

https://discuss.appium.io/t/webview-context-switching-not-working-on-ios-16-2/39354/11

https://github.com/appium/appium-xcuitest-driver/blob/master/docs/device-preparation.md#if-iosipados-version-is-164-or-above

If the bug is due to missing configuration in application code, please release the new version of demo app with patch for iOS 16.4 or higher for webview context detection and switcing.

Add new features to the demo app

We already got some great feedback on the WebdriverIO demo app and try to improve it each time so it fits your needs. To make it more an app that reflects your current app we would like to add some new features. We already have these in mind:

  • Add biometric login (Face/TouchID)
  • Add deep link support
  • Add localisation by adding more languages in the app so you can test the Appium locale/language option

Once these features are added to the app the https://github.com/webdriverio/appium-boilerplate will be updated with examples on how to automate these features.

So if you have some challenges and don't see them in this app, please let us know and we might be able to add them.

Not able to interact with password field on iOS 17.2

Description

Cannot automate password field in iOS 17.2 app, however, when we interact with the same field manually, we are able to interact.

Environment (please complete the following information):**

  • Node.js version: 18.19.0
  • NPM version: 10.2.5
  • Platform: iOS
  • Platform version: 17.2
  • Emulator/Simulator/Real Device: Simulator

Question?

Is there any setting which can be done, so we can automate password field?

Screenshot for reference:

SCR-20240116-095426

Add IPA file to downloads in assets

Business case
Some services like browserstack uses .IPA in real devices. We use the app as part of the unit tests on our framework around appium. Last release didn't included the IPA files.

Describe the solution you'd like
IPA files should be uploaded with the assets

Can't build iOS app with current versions and latest Xcode 10.3

Environment (please complete the following information):

  • Node.js version: 8.9.3
  • NPM version: 6.10.3
  • Platform: iOS
  • Platform version: 12.4.1
  • Emulator/Simulator/Real Device: Simulator, Real Device
  • Xcode version: 10.3

Describe the bug
I was trying to build an iOS application and to run it at least on Simulator, but it failed. I cloned your project, made 'npm install' and then 'npm run ios', but it failed with error:

$ npm run ios

[email protected] ios /Users/myuser/Documents/Projects/wdio-demo-native-demo-app
react-native run-ios

Scanning folders for symlinks in /Users/myuser/Documents/Projects/wdio-demo-native-demo-app/node_modules (10ms)
Found Xcode project wdioDemoApp.xcodeproj

Could not find iPhone 6 simulator

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: react-native run-ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Then I've tried to make 'npm fix audit' and execute 'npm run ios' again. It failed with error:

$ npm run ios

[email protected] ios /Users/myuser/Documents/Projects/wdio-demo-native-demo-app
react-native run-ios

warn The following packages use deprecated "rnpm" config that will stop working from next release:

  • react-native-vector-icons: https://github.com/oblador/react-native-vector-icons
    Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide.
    error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
  • react-native-vector-icons (to unlink run: "react-native unlink react-native-vector-icons")
    This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink " and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
    Read more about autolinking: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
    info Found Xcode project "wdioDemoApp.xcodeproj"
    info Launching iPhone X (iOS 12.4)
    info Building (using "xcodebuild -project wdioDemoApp.xcodeproj -configuration Debug -scheme wdioDemoApp -destination id=ADB20338-FC68-48DD-9A5F-231B32665660 -derivedDataPath build/wdioDemoApp")
    .............
    error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening wdioDemoApp.xcodeproj. Run CLI with --verbose flag for more details.
    User defaults from command line:
    IDEDerivedDataPathOverride = /Users/vgogulen/Documents/Projects/wdio-demo-native-demo-app/ios/build/wdioDemoApp

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference("d7c9a29262ff4df7424daeb0427a745529fe2a87b7c65fea7a8f025b04a3b7ff")) (in target 'wdioDemoApp')

Build system information
warning: The iOS Simulator deployment target is set to 7.0, but the range of supported deployment target versions for this platform is 8.0 to 12.4.99. (in target 'RNVectorIcons')

2019-09-02 09:59:10.272 xcodebuild[9771:1190678] DTDeviceKit: deviceType from bc74ac5dc57b3d479597338e686d58dccc4d9f43 was NULL
2019-09-02 09:59:10.304 xcodebuild[9771:1190645] DTDeviceKit: deviceType from 00008020-0004248A3645002E was NULL
2019-09-02 09:59:10.343 xcodebuild[9771:1190646] DTDeviceKit: deviceType from bc74ac5dc57b3d479597338e686d58dccc4d9f43 was NULL
2019-09-02 09:59:10.366 xcodebuild[9771:1190679] DTDeviceKit: deviceType from 00008020-0004248A3645002E was NULL
** BUILD FAILED **

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: react-native run-ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Expected behavior
Could you please update iOS part, so it could be built and launched on latest Xcode (10.3) and ran it on Simulator? Thanks in advance!

Webview is not rendering

Environment (please complete the following information):

  • Node.js version: [12.19]
  • NPM version: [6.14.0]
  • Platform: [Android]
  • Platform version: [14.0]
  • Emulator/Simulator/Real Device: [Emulator]

Describe the bug
The webview is not being rendered

To Reproduce
Open app
Tap webview

Expected behavior
Should render the webview

iOS app is not working with iOS 16.4

iOS demo app open and then close immediately. Even when try installing manually unable to access the app.

Some Appium logs:

[debug] [XCUITest] Checking whether app '/var/folders/_b/zs7rq91d2zz38h82t_0_0zqh0000gn/T/2023728-6795-1w98jul.1khz/wdioNativeDemoApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [XCUITest] Getting bundle ID from app '/var/folders/_b/zs7rq91d2zz38h82t_0_0zqh0000gn/T/2023728-6795-1w98jul.1khz/wdioNativeDemoApp.app': 'org.wdioNativeDemoApp'
[debug] [XCUITestDriver@89a9 (d503622c)] Event 'resetStarted' logged at 1693197484497 (00:38:04 GMT-0400 (Eastern Daylight Time))
[debug] [simctl] Error running 'terminate': An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device returned an error for the requested operation.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
The operation couldnโ€™t be completed. found nothing to terminate
found nothing to terminate
[XCUITest] Reset: failed to terminate Simulator application with id "org.wdioNativeDemoApp"
[XCUITest] Not scrubbing third party app in anticipation of uninstall

Webview is not loading

Environment (please complete the following information):

  • Node.js version: 12.18.3 / 14.17.5
  • NPM version: 6.11.3
  • Platform: Android
  • Platform version: 11
  • Emulator/Simulator/Real Device: Emulator

Describe the bug
Entering the webview throws an error

To Reproduce
Open the app
Tap webview

Expected behavior
Should display the webview but instead an error is thrown

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2021-08-27 at 09 01 16

Additional context
Add any other context about the problem here.

IOS real device build failure

Environment:
JDK 17.0.2
Appium 2.0
appium-java-client 8.5.1
Node v18.16.0
NPM 9.6.7
macOS Ventura 13.4
XCode 14.3
Real Device iPhone 11 (iOS 16.3)

Describe the bug
Unable to install on iOS real device.
XCode Build fails because of the legacy dependencies in the project.

To Reproduce
Download the source code.
Make sure that the cocoapods gem and ruby environment is already setup.
Navigate to ios folder and open the terminal. Run the command pod install to download all the dependencies.
Open wdioNativeDemoApp.xcworkspace file in ios directory.
Configure your bundleID and team in signing capabilities.
Choose minimum deployment according to IOS version i.e. 16.3.
Additionaly change the minimum deployment in Podfile also to this version.
Click on Product -> Build
Build fails with following two errors:
https://stackoverflow.com/questions/75897834/use-of-bitwise-with-boolean-operands-xcode-14-3-fails-builds-using-react-n

I fixed the abover error by replacing the bitwise operator with boolean operand. and rebuild the project.
The build fails in the end with the following error:
https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported

As per the thread, it is related to the older ssl dependency in the older node version.

Expected behavior

Build should be successfull with no errors.

Screenshots

The console output is as follows:

info React Native v0.72.3 is now available (your project is running on v0.64.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.72.3.
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.64.1.
info To upgrade, run "react-native upgrade".
Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at stableHash (/Users/xxxx/Downloads/native-demo-app/node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/Users/xxxx/Downloads/native-demo-app/node_modules/metro-transform-worker/src/index.js:647:7)
    at getTransformCacheKey (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:32:19)
    at new Transformer (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/DeltaBundler/Transformer.js:180:28)
    at /Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/Bundler.js:58:29
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

XCode log shows this error:

Command PhaseScriptExecution failed with a nonzero exit code

Failed to construct transformer:  Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at stableHash (/Users/xxxx/Downloads/native-demo-app/node_modules/metro-cache/src/stableHash.js:19:8)
    at Object.getCacheKey (/Users/xxxx/Downloads/native-demo-app/node_modules/metro-transform-worker/src/index.js:647:7)
    at getTransformCacheKey (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/DeltaBundler/getTransformCacheKey.js:32:19)
    at new Transformer (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/DeltaBundler/Transformer.js:180:28)
    at /Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/Bundler.js:58:29
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
error Cannot read properties of undefined (reading 'transformFile').
TypeError: Cannot read properties of undefined (reading 'transformFile')
    at /Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/Bundler.js:95:34
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/Bundler.js:14:24)
    at _next (/Users/xxxx/Downloads/native-demo-app/node_modules/metro/src/Bundler.js:36:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
info Run CLI with --verbose flag for more details.
Command PhaseScriptExecution failed with a nonzero exit code

Additional context
Please update the documentation for building the app on iOS real devices.

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.