【问题标题】:How can I interact with my custom keyboard from Xamarin UITest?如何与 Xamarin UITest 中的自定义键盘进行交互?
【发布时间】:2016-06-09 07:30:35
【问题描述】:

我正在 iOS 上试用 Xamarin.UITest,但遇到了无法滚动自定义 UIPickerView 键盘的问题。

所以我的问题是:如果我有一个UIPickerView 作为键盘,我该如何选择一个值?

【问题讨论】:

    标签: xamarin xamarin.ios uitest xamarin.uitest


    【解决方案1】:

    您可以简单地在您的UIPickerView 上执行.Invoke("selectRow", 3 , "inComponent", 3, "animated", true) 来执行方法picker.SelectRow(3, 3, true)

    完整声明:

    app.Query(e => e.Id("MyUIPickerId").Invoke("selectRow", 3 , "inComponent", 3, "animated", true));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-17
      • 1970-01-01
      • 1970-01-01
      • 2015-03-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多