When checking Safari alert messages on an iOS real device, some models may get a different message than the one actually displayed. For example, for the alert message “I am a JS Alert” displayed in the figure below, the character string is acquired as “I am a JS Alert\nI am a JS Alert” (\n indicating a new line).
As a known issue, MagicPod-based OSS and Appium projects are also detected, and there are no plans to correct this at the current time. If this phenomenon occurs, you can work around the same by using the “Assert alert message contain” instead of “Assert alert message equal” command.
Presently, this has been reproduced in the following environments.
- Environment: External Cloud (BrowserStack)
- OS: iOS 14.1
- Model: iPhone 12