Group Group Group Group Group Group Group Group Group

UITesting + webViews

GoogleSignIn 5.0.0 signin page picks up mobile browser default language; how do you write tests for webViews in such a case (currently using staticTexts )? (Localize those strings if using staticTexts ? LOL)

[Edit]

Anyone knows what the query for the element the arrow is pointing at is? I want to set the language before I assert against static texts as GoogleSignIn page picks up the default language

Hi @lganti,
Have you looked at the System Locale, when you say it picks up the default language, that is set by the user on the device as the current locale. You can try to set the locale, using the header property for the webview.

you can also set the default language while testing by setting it in the schema or by passing the launch arguments to change the language/locale.

cheers,

1 Like

Changing the application language and region in the product scheme seems to have no effect on the language of the Google login form; am unsure if I can set the locale using the header property as you suggest during UI Testing but will try it out, thanks!

This topic was automatically closed after 166 days. New replies are no longer allowed.