如何检查本机 iOS 应用程序上的元素

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15235657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 22:35:43  来源:igfitidea点击:

How can I inspect elements on native iOS application

iosinspect

提问by user2073224

I am running an iOS native app on iOS Simulator and would like to inspect the elements on the app to get the ID.

我正在 iOS 模拟器上运行 iOS 本机应用程序,并希望检查应用程序上的元素以获取 ID。

Does anyone knows how this can be done?

有谁知道如何做到这一点?

Note:Please, this question is for iOS native App not Web based app!

注意:注意,这个问题是针对 iOS 原生应用的,而不是基于 Web 的应用!

Thanks

谢谢

回答by Ben Gotow

It sounds like you may be looking for something like Firebug or the Chrome Inspector for your native app? I'm not sure what you mean by "ID". Interface elements in iOS don't really have IDs the same way DOM elements have IDs.

听起来您可能正在为您的本机应用程序寻找 Firebug 或 Chrome Inspector 之类的东西?我不确定您所说的“ID”是什么意思。iOS 中的界面元素实际上并不像 DOM 元素具有 ID 那样具有 ID。

You should check out the Spark Inspector (http://www.sparkinspector.com/), which allows you to see the views of your app and modify them at runtime - it may help you see what you're looking for. Full disclosure: I am the author of the app ;-)

您应该查看 Spark Inspector ( http://www.sparkinspector.com/),它允许您查看应用程序的视图并在运行时修改它们 - 它可以帮助您了解您正在寻找的内容。完全披露:我是该应用程序的作者;-)

回答by CStreel

You need to inspect the App's Bundle.

您需要检查应用程序的捆绑包。

Check this answer on stackoverflow, to get the appID: https://stackoverflow.com/a/8883166/933887

在 stackoverflow 上查看此答案,以获取 appID:https://stackoverflow.com/a/8883166/933887

回答by Natan R.

There is a new app, called Reveal, that does an incredible job. Not only you can check view's properties, you can also view all the app in a "exploded" 3D view, change the sizes and properties. Specially for iOS 7, where the view controller starts from the beginning of the screen (and not below the navigation bar), it can be really useful.

有一个名为 Reveal 的新应用程序可以完成令人难以置信的工作。您不仅可以检查视图的属性,还可以在“分解”3D 视图中查看所有应用程序,更改大小和属性。特别是对于 iOS 7,视图控制器从屏幕的开头(而不是导航栏下方)开始,它真的很有用。

You can download the trial at http://revealapp.comand decide which license you should get.

您可以在http://revealapp.com下载试用版并决定您应该获得哪个许可证。

回答by Cesargv

Appium has an inspector for ios applications. This is the link for appium: http://appium.io/and in this video you can see the inspector in action: https://www.youtube.com/watch?v=jQZTRz2W9xg

Appium 有一个针对 ios 应用程序的检查器。这是 appium 的链接:http://appium.io/ ,在此视频中,您可以看到检查器在运行:https: //www.youtube.com/watch?v=jQZTRz2W9xg