Giter Club home page Giter Club logo

Comments (10)

mykola-mokhnach avatar mykola-mokhnach commented on June 8, 2024 1

It could be that keyboard belongs to the springboard app. Switch to com.apple.springboard app and see if the keyboard is accessible from there.
If none from proposed options works then consider creating an issue to Apple's XCTest

from appium.

KazuCocoa avatar KazuCocoa commented on June 8, 2024 1

Yes, once you change the active app to sprintboard, the page source may show keys like: <XCUIElementTypeKey type=\"XCUIElementTypeKey\" name=\"delete\" label=\"delete\" enabled=\"true\" visible=\"true\" accessible=\"true\" x=\"264\" y=\"930\" width=\"79\" height=\"94\" index=\"10\"/> (which is from my real iPad device's keyboard)

#20071 (comment)
https://appium.github.io/appium-xcuitest-driver/latest/guides/troubleshooting/#interact-with-dialogs-managed-by-comapplespringboard

from appium.

KazuCocoa avatar KazuCocoa commented on June 8, 2024

Did the key in the result of page_source? I wondered if it could be interactable via Springboard if you haven't tried yet.
https://appium.github.io/appium-xcuitest-driver/latest/guides/troubleshooting/#interact-with-dialogs-managed-by-comapplespringboard

from appium.

KazuCocoa avatar KazuCocoa commented on June 8, 2024

Could you share the appium server log as well? Filling in the bug report (if it was that) would also be helpful. Or https://discuss.appium.io/ could help with a general question

from appium.

bawarim avatar bawarim commented on June 8, 2024

Attached are the detailed Appium logs. I am getting below error on logs.

2024-05-04 17:56:10.000 E App(WebKit)[463] : maximumViewportInset cannot be larger than frame
2024-05-04 17:56:10.000 E App(WebKit)[463] : minimumViewportInset cannot be larger than frame
2024-05-04 17:56:31.000 E App(DataDeliveryServices)[463] : Error for queryMetaDataSync: 2
2024-05-04 17:56:31.000 E App(DataDeliveryServices)[463] : Error for queryMetaDataSync: 2

device.log

from appium.

KazuCocoa avatar KazuCocoa commented on June 8, 2024

Did is on WebView? The full appium log would help to understand the situation.

from appium.

bawarim avatar bawarim commented on June 8, 2024

Yes, its on WebView as the app is hybrid.

2024-05-04 17:56:31.000 E App(DataDeliveryServices)[463] : Error for queryMetaDataSync: 2
2024-05-04 17:56:31.000 I App(DataDeliveryServices)[463] : assetsForQuery: <query: com.apple.MobileAsset.LinguisticData, locO: 1, iO: 1, latO: 1, <filter: {
AssetLocale = "{(\134n en\134n)}";
AssetType = "{(\134n Delta\134n)}";
}>> final result: (
) was cached: 0, cachedOnly: 0
2024-05-04 17:56:31.000 I App(MobileAsset)[463] : -[MAAssetQuery getResultsFromMessage:]: Got the query meta data reply for: com.apple.MobileAsset.LinguisticData, response: 2
2024-05-04 17:56:31.000 E App(DataDeliveryServices)[463] : Error for queryMetaDataSync: 2
2024-05-04 17:56:31.000 I App(DataDeliveryServices)[463] : assetsForQuery: <query: com.apple.MobileAsset.LinguisticData, locO: 1, iO: 1, latO: 1, <filter: {
AssetLocale = "{(\134n en\134n)}";
AssetType = "{(\134n Optional\134n)}";
}>> final result: (
) was cached: 0, cachedOnly: 0
2024-05-04 17:56:31.000 I App(WebKit)[463] : 0x112000140 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:31.000 I App(WebKit)[463] : 0x112000140 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Received request to notify when the main run loop is idle
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Idle notifier finished setting up run loop observer
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Idle notifier run loop observer fired
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Sending main run loop idle reply
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Received request to notify when animations are idle
2024-05-04 17:56:44.000 I App(XCTAutomationSupport)[463] : Sending animations idle reply with error: (null)
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120001b0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120002b0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x112000300 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120003c0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120001b0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120002b0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x112000300 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x1120003c0 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(UIKitCore)[463] : deactivate generator with style: TurnOn; activationCount: 1 -> 0; styleActivationCount: 1 -> 0; <_UIKeyboardFeedbackGenerator: 0x282d43020>
2024-05-04 17:56:53.000 I App(UIKitCore)[463] : deactivate engine <_UIFeedbackSystemSoundEngine: 0x28315e3e0>, clientCount: 1 -> 0
2024-05-04 17:56:53.000 I App(UIKitCore)[463] : _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x28315e3e0>, clientCount: 0, suspended: 0
2024-05-04 17:56:53.000 I App(UIKitCore)[463] : _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x28315e3e0> tearedDown: 1
2024-05-04 17:56:53.000 I App(UIKitCore)[463] : engine <_UIFeedbackSystemSoundEngine: 0x28315e3e0: state=0, numberOfClients=0, prewarmCount=0, _internal_isSuspended=0> state changed: Running -> Inactive
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x112000210 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:53.000 I App(WebKit)[463] : 0x112000210 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:54.000 I App(WebKit)[463] : 0x112000140 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::Activity: Starting foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'
2024-05-04 17:56:54.000 I App(WebKit)[463] : 0x112000140 - [PID=465, throttler=0x1130015d8] ProcessThrottler::Activity::invalidate: Ending foreground activity / 'WebPageProxy::runJavaScriptInFrameInScriptWorld'

from appium.

mykola-mokhnach avatar mykola-mokhnach commented on June 8, 2024

I don't think it is going to work because XCTest for iOS does not allow to send keys, but rather keystrokes.
The most reliable way to do that would be to locate the key itself as a screen element and tap it.
You may also try to simulate sending of the same keystroke that WDA does for the "clear" API: https://github.com/appium/WebDriverAgent/blob/53bcaa87ba45dcda433daf23631e245139599413/WebDriverAgentLib/Categories/XCUIElement%2BFBTyping.m#L179

from appium.

bawarim avatar bawarim commented on June 8, 2024

@mykola-mokhnach I was trying to identify the the keyboard keys as a screen elements but could not able to recognize the keyboard elements as well in both native and WebView mode.

image

image

from appium.

bawarim avatar bawarim commented on June 8, 2024

@KazuCocoa @mykola-mokhnach this worked after switching to com.apple.springboard. Thanks a ton for your help! :)

from appium.

Related Issues (20)

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.