1

I am running tests on Xamarin Test Cloud, where I am unable to Upload the images or files in script that I have written. The script gets stuck at a statement app.Tap(x => x.Text("Attach Image")). Where button event is clicked and options are given to upload the file from the gallery or camera...

app.Tap(x => x.Class("FormsImageView").Index(3));
// app.Repl();
app.Tap(x => x.Text("Loews Chicago O'Hare"));
//app.Tap(x => x.Text("Attach Image"));
//app.Tap(x => x.Text("Open Gallery"));
//app.Tap(x => x.Id("text1"));
app.Tap(x => x.Class("EditorEditText"));
Snostorp
  • 544
  • 1
  • 8
  • 14
doe
  • 11
  • 2

1 Answers1

0

If I'm understanding your approach correctly, then the problem is likely two-fold:

  1. Xamarin.UITest cannot automate system apps like the Gallery or Camera. In order to run tests dependent on features of the system apps, the behavior has to actually be integrated into your app itself, so that it doesn't require launching a separate app; or you have to employ backdoor methods to simulate the behavior for your tests.
  2. You might not be including the files so that Xamarin.UITest can access them. Files your app needs to run tests must either be included as an embedded resource or uploaded using the --data optional flag in the command line.

More information:

user62171
  • 641
  • 7
  • 18