Code Monkey home page Code Monkey logo

native-demo-app's Issues

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.

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

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

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

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

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.

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.

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.