Escaping colons in Xamarin UI Tests
I recently wrote a UI test for an app which displayed a CSS ID which included a colon. The UI tree from the REPL looked like this:
Googling did bring me closer to a possible solution by suggesting to escape the colon with a backslash, which ended in the following output:
So no luck, before going into any detail here is how to solve the issue:
iOS
Android
The reason why the colon has to be escaped that many times is because the string will be passed through multiple runtimes. Each will be interpreting and escaping the string anew. The differing count is due to how Xamarin UI Tests have to handle the platforms.
Reference
Many thanks to Tobias Røikjer from the Xamarin UI Testing team for pointing out how to solve this problem.