2016-11-08 49 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] –