maestro icon indicating copy to clipboard operation
maestro copied to clipboard

[v1.27.0] `inputText` failing on `secureTextEntry`

Open KrisLau opened this issue 1 year ago • 9 comments

Describe the bug inputText failing on secureTextEntry. The Input is showing a "Strong Password" message and text entry just becomes disabled

To Reproduce Steps to reproduce the behavior, e.g.:

  1. Start the simulator
  2. Run maestro test with - inputText: 'whatever" on a secure text entry Input
  3. The Flow fails at the text input

Expected behavior Enter the password

Screenshots image

Environment information (please complete the following information):

  • Maestro version: v1.27.0
  • Platform: iOS 16.2
  • Device model and OS version: iPhone 11
  • Simulator
  • Host: Mac Mini

Workspace (if applicable) N/A

Bug report output (if applicable) N/A

Additional context N/A

KrisLau avatar May 11 '23 19:05 KrisLau

Facing the same issue. Android does not suffer from this. It also doesn't help to set the secureTextEntry property to false

filipgerat avatar May 11 '23 22:05 filipgerat

I have the same issue and can't get through login/signup step

andrejguran avatar May 15 '23 14:05 andrejguran

Same here, any recommendation to fix it please ?

hkawii avatar May 16 '23 19:05 hkawii

It's not great, but as a workaround I'm setting those fields to be normal text fields when I detect I'm in testing mode.

orbiteleven avatar May 17 '23 10:05 orbiteleven

As a workaround, you could disable auto-filling in your simulator. Inside your simulator: Settings → Passwords → Type in a random password → Password options → Disable toggle

In Maestro Cloud, it seems to be disabled by default, so there are no issues there.

EDIT: Depending on the OS version of the simulator, this is disabled or enabled by default. If enabled, it fails, or you manually do this workaround.

thalmann-christof avatar May 24 '23 09:05 thalmann-christof

For anyone else running into this, I have two solutions:

Maestro

- launchApp:
    appId: "com.apple.Preferences"
- tapOn: "Passwords"
- inputText: "a" # anything works here as the password
- pressKey: Enter
- tapOn: "Password Options"
- runFlow:
    when:
      visible: "1" # Only toggle when currently ON. This isn't great, but I don't know of a way to be more explicit about which toggle it is. Luckily, there's just the one for AutoFill Passwords (for now...)
    commands:
      - tapOn: "AutoFill Passwords"

That's obviously not great.

However, here's how you can do it via the CLI beforehand:

plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO /Users/jesse/Library/Developer/CoreSimulator/Devices/5CF9D7C1-293E-4EB7-8FAB-B0B9A083B4DB/data/Library/UserConfigurationProfiles/EffectiveUserSettings.plist

Replace your simulator's device ID of course.

Note: The CLI approach doesn't seem to work in all environments. It works locally for me on my laptop, but seems to have no effect on CircleCI.

solidcell avatar Aug 03 '23 18:08 solidcell

Hi 👋🏽 Any updates on this issue? I'm facing the same issue.

However, here's how you can do it via the CLI beforehand:

plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO /Users/jesse/Library/Developer/CoreSimulator/Devices/5CF9D7C1-293E-4EB7-8FAB-B0B9A083B4DB/data/Library/UserConfigurationProfiles/EffectiveUserSettings.plist

↑ For my case, just running this command didn't solve the issue but running this command ↓ too solved it.

plutil -replace restrictedBool.allowPasswordAutoFill.value -bool NO ~/Library/Developer/CoreSimulator/Devices/YOUR_DEVICE_ID/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles/UserSettings.plist

imjn avatar Mar 25 '24 11:03 imjn

Having the same issue here on maestro 1.36.0. I've temporarily worked around this by disabling secureTextEntry in test environments.

eeston avatar Mar 25 '24 20:03 eeston

I managed to get it working with specifying the text in env variable and then using the variable:

appId:  someId
env:
  PASSWORD: "111111"
---

- tapOn:
    id: "inputId"
- inputText: ${PASSWORD}

EDIT: with combination of secureTextEntry={false}

pehoracek avatar Apr 05 '24 08:04 pehoracek

@axelniklasson

KrisLau avatar Jul 11 '24 17:07 KrisLau