plain execute_script is still supported for iOS--you can use it to run arbitrary UIAutomation stuff. not sure if that information alters your purpose here, i'm not sure what this code does.