2016-11-08 37 views

回答

1

app.Query(c => c.Id("MonthValue").Text("11"))应该这样做

+0

是的,但我必须得到这个值,因为我可以通过+/-更改此值。 (c => c.Id(“MonthValue”)。getText()) –

+1

AppResult有一个Text属性,所以试试app.Query(c => c.Id ( “MonthValue”))。文字。 https://developer.xamarin.com/api/property/Xamarin.UITest.Queries.AppResult.Text/ – JimBobBennett

1

想要更新吉姆的回答。 app.Query返回一个数组,因此我们不能使用 app.Query(c => c.Id("MonthValue")).Text作为它自己。我们应该使用app.Query(c => c.Id("MonthValue"))[0].Text例如

+0

谢谢!它为我工作索引[1] –