Some times while executing tests, when we are querying using device_agent.query or device_agent.touch or device_agent.keyboard_visible?, it throws error The DeviceAgent is not running. These are the elements safari web view hence, unable to query or touch using the core methods.
Our understanding is that when a scenario is running, ideally the device_agent should always be running.
Xcode - 9.2
iOS 11
run_loop - 2.6.2, 2.6.3
calabash - 0.21.1