appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
124 stars 24 forks source link

Is there a multi-language testing feature in mac2-driver? If so how to use it? #101

Open aakrandan opened 2 years ago

aakrandan commented 2 years ago

I wanted to test my Mac application for multi-language issues. As in if i change the language and locale of my system, there should not be any truncation or distortion in the UI. Is there way to test such scenarios using Mac2-driver?

mykola-mokhnach commented 2 years ago

You could try to use command line args for this purpose. Read https://forum.xojo.com/t/start-app-in-a-different-language-with-different-locale-settings/25219 for more details.

aakrandan commented 2 years ago

@mykola-mokhnach thank you. I will go through the link.

aakrandan commented 2 years ago

Okay, the above article talks about how to launch the application in different languages. But is there a way to make use of it and automate? For example, fetching all the localised strings from the application contents folder and then comparing it with the UI strings. Can this be done?

mykola-mokhnach commented 2 years ago

For example, fetching all the localised strings from the application contents folder and then comparing it with the UI strings.

No the driver does not provide such functionality. You could try to fetch this info using AppleScript though as a possible workaround

aakrandan commented 2 years ago

@mykola-mokhnach I see that there is this API "getAppStringMap", but it is throwing an error for me.

Also could you help me, what do you have in your mind w.r.t apple script and localisation?