Cross-platform apps stand out by their ability to run in various operating systems (OSs), such as Android, iOS, and Windows. Such apps are developed using popular frameworks for cross-platform app development such as Apache Cordova, Xamarin, and React Native. However, the mechanisms to automate their tests are not cross-platform and do not support multiple configurations. Hence, different test scripts have to be coded for each platform, yet there is no guarantee they will work in different configurations varying, e.g. platform, OS version, and hardware available. This study proposes mechanisms to produce automated tests for cross-platform mobile apps. In order to set up the tests to execute in multiple configurations, the authors' approach adopts two reference devices: one running Android and other iOS. As both platforms have their own user interface (UI) XML representation, they also investigated six individual expression types and two combined strategies to locate UI elements. They have developed a prototype tool called cross-platform app test script recorder (x-PATeSCO) to support the proposed approach, as well as the eight locating strategies considered. They evaluated the approach with nine cross-platform mobile apps, comparing the locating strategies in six real devices.