WebKit Streaming Violation - Initial Use of WebKit from a Secondary Stream in UI Automation

When I tried to run automation scripts through the terminal using Xcode 6, I received this error message:

WebKit Threading Violation - initial use of WebKit from a secondary thread. 

Can someone help me run automation scripts via terminal or tool in Xcode 6.

+3
javascript ios-ui-automation
source share
2 answers

I see the same message infrequently - even when everything works successfully.

You may have problems running the tools from the command line due to changes to the command line utilities for Xcode 6.

Check out Calling UIAutomation from the command line using Xcode 6

adding the -w flag made me work again. i.e.

 -w "Resizable iPad (8.0 Simulator)" 

Also, make sure you pass -w before the path to the application file:

 instruments -t "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate" -w "iPad Air (8.0 Simulator)" "/path/to/My.app" -e UIASCRIPT "scriptola.js" 

Here is a list of devices:

  • Resizable iPad (Sim 8.0)
  • Changeable iPhone (Sim 8.0)
  • iPad 2 (7.1 Simulator)
  • iPad 2 (simulator 8.0)
  • iPad Air (7.1 Simulator)
  • iPad Air (Sim 8.0)
  • iPad Retina (7.1 Simulator)
  • iPad Retina (Sim 8.0)
  • iPhone 4s (7.1 Simulator)
  • iPhone 4s (Sim 8.0)
  • iPhone 5 (7.1 Simulator)
  • iPhone 5 (simulator 8.0)
  • iPhone 5s (7.1 Simulator)
  • iPhone 5s (Sim 8.0)
  • iPhone 6 (simulator 8.0)
  • iPhone 6 Plus (Sim 8.0)
+1
source share

I ran into the same problem, I solved it by following these steps:

Check ur UIAutomation enabled or not in device? -> Check it, Go to Settings → Developer → Enable UIAutomation

reboot your device and then try. This works for me ... :)

0
source share