UIautomatorviewer cannot create UI xml hierarchy for default calling app in samsung S6 on android 7 - python-appium

I need xpath of dial button,answer button, reject call button and so on but UIautomatorviewer doesnt create UI xml hierarchy for default calling app in samsung S6. Is there any other way to get these UI elements? Uiautomatorviewer works fine on HTC 10 with android 7.

The easiest way is to use Appium-Desktop:
Just launch your application under test with appium-desktop, then switch on device/emulator to any app you want (e.g. Dialer app) and refresh inspector:

Related

How to make the flutter app shows as it's an IOS version app inside android

I have a flutter app on an android device, it shows the app with the android adaptive things such as the date picker, the app bar, the dialogs...
I want to try a version of the app like it's on IOS, I mean I want that date picker shows as the IOS's, also for the app bar.
I'm pretty sure that this is related to the MediaQuery, but I just don't know what is it.
I know that I can show forcefully the widgets from the Cupertino library, however, I don't want to do it, I want just to get how the app will show when it runs on IOS with the current code.
Thank you !
Wherever you're setting your theme, you can simply set the platform property on it to TargetPlatform.iOS.
This should allow the theming to use iOS-specific widgets rather than their android counterparts. Note that this may not work everywhere; if Dart:io's Platform were used incorrectly in your code or 3rd party code for theming, this would not be overridden.

Ionic Android Strange routing when physical key is pressed [Honeywell CK65]

We are developing Ionic android app and we are having a strange problem with Honeywell CK65 device, to be more specific with device physical keyboard.
If the app is being used only by touch, without device physical keyboard, the app is working correctly.
But when physical keyboard is used, example
when ENTER key is pressed, it should navigate to another page but the remain freeze and it appends on the bottom page the previous page.
Any help will be appreciated. thanks in advance.
You need to somehow configure the app to use the devices keyboard. My guess is that you need to create a custom plugin to call the device's built in keyboard and map those keys to a function.
We resolved the problem using ionic ion-router-outlet instead of angular router-outlet

Is there a way to launch notes application in flutter from button click?

I have a button in my app. On click of the button, I want the notes app in the device to get launched whether iOS or Android. I there a way around this with flutter? I haven't discovered any solution yet.
Yes there is this plugin external_app_launcher will helps you to open another app from your app by providing PackageName for Android and URLscheme for IOS external_app_launcher

How to open url in Safari and the get back to the app under UITests in Xcode 7?

This is my custom view where "LondonStreet" is a button.
When I tap that button I get url and open it in Safari (it works). Then I can go back, using "Back to Wishlist" button (it also works).
The problem is when I try to test this under UITests.
itemsTable.cells.elementBoundByIndex(0).buttons["addressButton"].tap() //press the button to open link in Safari
Along with this line:
app.statusBars.buttons["Back to Wishlist"].tap() //go back, doesn't work, although it was recorded by Xcode itself.
is an error:
UI Testing Failure - Failed to get screenshot within 5s.
And also in issue Navigator
UI Testing failure - Unable to update application state promptly.
Starting in iOS 11 you can interact with other applications using the XCUIApplication(bundleIdentifier:) initializer.
To get back to your app you'd do something like:
let myApp = XCUIApplication(bundleIdentifier: "my.app.bundle.id")
let safari = XCUIApplication(bundleIdentifier: "com.apple.mobilesafari")
// Perform action in your app that opens Safari
safari.wait(for: .runningForeground, timeout: 30)
myApp.activate() // <--- Go back to your app
UI Testing cannot interact with anything outside of your application. In your scenario, the framework can no longer do anything once your app opens Safari.
To verify this, try printing out the app's hierarchy once Safari opens. You will notice that nothing in Safari nor the navigation bar will show up - you will only see your app's information.
print(XCUIApplication().debugDescription)
To open specific url in Safari on iOS 15:
safari.textFields["Address"].tap()
safari.textFields["Address"].typeText("www.urlToOpen.com")
safari.keyboards.buttons["Go"].tap()

Webview elements inspection for testing

We have a web view in our app which is being detected as a single webpage element (android.webkit.WebView). not showing the layout hierarchy to inspect individual UI components. I have tried to inspect the elements using 'UI Automator Viewer' and 'Appium Inspector' and same results. Is there any other tool which can be used for inspecting web views? Please advise!
UIAutomatorViewer is able to see native elements only. Everything underneath WebView is web elements. You need to switch from native to web context.
Link
This functionality was broken in Android Lollipop but appears to have recently been fixed with Android System Webview v44, try upgrading webview and inspecting then