Script commands are not running and it says element not found, but the same script works in emulator. Could you help me out?

Script commands are not running and it says element not found, but the same script works in emulator. Could you help me out?

Hi Brett,

This looks like a pop-up issue. Please use the below capability:

caps.setCapability("autoGrantPermissions", "true")