The root cause was this method (can you spot the error?):
To quickly debug this, I opened up a C# REPL window (I used the one from VisualStudio C# REPL but you can also use the one from the main O2 Platform exe):
Then I:
- copied the body of the AutomationTests_Setup into to the C# REPL environment,
- fixed the errors and
- replicated the error:
Once there it was easy to find and fix the error (and get a valid Uri):
Note: originally (i.e. the first time I got this bug), I actually did this while in debug mode (i.e. the REPL was running under VS debug mode, which is pretty cool)