-1

Currently I am using xamarin to test a software running on HTC Android Phone 6.0.1. As for the numberpicker input, I have a problem, that is not working on the Set button to save the month. The ways I used to affect the set button:

app.tap̣ (x => x.Id ("button1")); 

With button1 is the id of the Set nut

app.tap (x => x.Text ("Set")); 

Set is the value of the button's text property

app.TapCoordinates (230,400) 

with 230 and 400 are the x and y values of the Set button What should I do next? Thank you all for your comments

jgoldberger - MSFT
  • 5,978
  • 2
  • 20
  • 44

1 Answers1

0

try

app.Tap (x => x.Marked ("Set"));
jgoldberger - MSFT
  • 5,978
  • 2
  • 20
  • 44
  • i think app.Tap (x => x.Marked ("Set")); like app.Tap(x=>x.Text("Set")); – Thái Nguyễn Quang Dec 04 '18 at 03:17
  • app.Tap (x => x.Marked ("Set")); it not working on HTC 10 Android 6.0.1 form set month and year not remove – Thái Nguyễn Quang Dec 04 '18 at 08:15
  • when i user codes while(app.Query(x => x.Marked("Set")).Count()>0 && i<=10) { app.Tap(x => x.Marked("Set")); i++; Console.WriteLine("lan thu " + i); Thread.Sleep(5000); } then result in the log file write repeat 11 times lan thu 1 04-12-2018 09:15:46.572 +01:00 - 262589 - Query for Marked("Set") gave 1 results. 04-12-2018 09:15:47.880 +01:00 - 263897 - Using element matching Marked("Set"). 04-12-2018 09:15:47.880 +01:00 - 263897 - Tapping coordinates [ 959, 859 ]. So i think Set Button not working – Thái Nguyễn Quang Dec 04 '18 at 09:05
  • You can reach out to app center support for further help then. App Center support helps with UITest code issues. https://intercom.help/appcenter/getting-started/getting-help-with-app-center – jgoldberger - MSFT Dec 04 '18 at 19:47