Xamarin UITest iOS 未找到 Repl 中的选项卡徽章查询
Xamarin UITest iOS Tab Badge Query in Repl Not Found
在 Repl I 运行 中查询“1”,这是选项卡上的当前徽章编号。
这返回了以下查询,您可以看到它具有 class _UIBadgeView。
然而,当我 运行 查询 _UIBadgeView 时,我什么也没得到。
app.Query("_UIBadgeView");
和 app.Query(c => c.Class("_UIBadgeView"));
我都试过了
关于如何访问徽章视图的任何想法?
{
Id => null,
Description => "<_UIBadgeView: 0x7e5cd380; frame = (49.5 2; 18 18); text = '1'; userInteractionEnabled = NO; layer = <CALayer: 0x7e5cceb0>>", Rect => {Width => 18, Height => 18, X => 145.5, Y => 621, CenterX => 154.5, CenterY => 630
},
Label => "1",
Text => "1",
Class => "_UIBadgeView",
Enabled => false
}
这不是很明显,可能是一个错误,但下划线不被视为大写字符。对于以下划线开头的 iOS class 名称,使用 ClassFull
而不是 Class
。
For iOS (first char lowercase): An element that has the class (or
super class) name of the given value prepended with "UI". Example:
button becomes UIButton. For iOS (first char uppercase): An element
that has the class (or super class) name of the given value.
For iOS: An element that has the class (or super class) name of the given value.
在 Repl I 运行 中查询“1”,这是选项卡上的当前徽章编号。
这返回了以下查询,您可以看到它具有 class _UIBadgeView。
然而,当我 运行 查询 _UIBadgeView 时,我什么也没得到。
app.Query("_UIBadgeView");
和 app.Query(c => c.Class("_UIBadgeView"));
关于如何访问徽章视图的任何想法?
{
Id => null,
Description => "<_UIBadgeView: 0x7e5cd380; frame = (49.5 2; 18 18); text = '1'; userInteractionEnabled = NO; layer = <CALayer: 0x7e5cceb0>>", Rect => {Width => 18, Height => 18, X => 145.5, Y => 621, CenterX => 154.5, CenterY => 630
},
Label => "1",
Text => "1",
Class => "_UIBadgeView",
Enabled => false
}
这不是很明显,可能是一个错误,但下划线不被视为大写字符。对于以下划线开头的 iOS class 名称,使用 ClassFull
而不是 Class
。
For iOS (first char lowercase): An element that has the class (or super class) name of the given value prepended with "UI". Example: button becomes UIButton. For iOS (first char uppercase): An element that has the class (or super class) name of the given value.
For iOS: An element that has the class (or super class) name of the given value.