webdriverio / native-demo-app Goto Github PK
View Code? Open in Web Editor NEWGuinea pig app for showcasing test automation with WebdriverIO and Appium
License: MIT License
Guinea pig app for showcasing test automation with WebdriverIO and Appium
License: MIT License
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:
locale
/language
optionOnce 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.
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 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
Cannot automate password field in iOS 17.2 app, however, when we interact with the same field manually, we are able to interact.
Is there any setting which can be done, so we can automate password field?
Environment (please complete the following information):
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.xcodeprojCould 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/wdioDemoAppnote: 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!
Environment (please complete the following information):
Describe the bug
The webview is not being rendered
To Reproduce
Open app
Tap webview
Expected behavior
Should render the webview
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.
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
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.
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.
Environment (please complete the following information):
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.
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.