Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在 iOS 上试用 Xamarin.UITest,但遇到了无法在自定义UIPickerView键盘中滚动的问题。
UIPickerView
所以我的问题是:如果我有UIPickerView一个键盘,我该如何选择一个值?
您可以简单地.Invoke("selectRow", 3 , "inComponent", 3, "animated", true)在您UIPickerView的执行方法上执行picker.SelectRow(3, 3, true)。
.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));