Hi Divakar,
Thanks for the reply.
Now simulator is opening but I am facing Phishing site issue.
I guess that ios-driver start the simulators(IOS 8) with FraudWarning option enabled.
Do you have an idea how to start mobile safari with disabled phishing warning?
Desired capabilities used :
capabilitiesIOS.setCapability(“safariAllowPopups”, false);
capabilitiesIOS.setCapability(“safariIgnoreFraudWarning”, “true”)
Appium Logs:
LVC-MacBook-Pro:~ valtech$ info: Welcome to Appium v1.3.1 (REV 1160ce02bb89c354cb99317985123acf39f0e7d3)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“8.0”,“safariIgnoreFraudWarning”:“true”,“platformName”:“iOS”,“deviceName”:“iPad Retina”,“browserName”:“Safari”,“safariAllowPopups”:false}}
info: Client User-Agent string: undefined
warn: Converting cap safariIgnoreFraudWarning from string to boolean. This might cause unexpected behavior.
info: [debug] Configuring Safari session
info: [debug] We’re on iOS8+ so not copying mobile safari app
info: [debug] Creating new appium session bb06e368-f6dc-4a84-92f5-3e6016d72e45
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Getting sdk version from xcrun with a timeout
info: [debug] iOS SDK Version set to 8.0
info: [debug] Checking whether instruments supports our device string
info: [debug] Getting list of devices instruments supports
info: [debug] Instruments is at: /Applications/Xcode6.app/Contents/Developer/usr/bin/instruments
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.0”,“iOSSDKVersion”:“8.0”,“deviceName”:“iPad Retina”,“platformVersion”:“8.0”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPad Retina (8.0 Simulator)’
info: [debug] iOS sim UDID is E4F547DE-AB20-4235-A57F-412555C922D5
info: [debug] Detecting automation tracetemplate
info: [debug] Not auto-detecting udid, running on sim
info: [debug] Localizable.strings is not currently supported when using real devices.
info: [debug] Creating instruments
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/valtech/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/usr/local/bin/node”,“commandProxyClientPath”:“/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D…ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js
info: [debug] Reusing dynamic bootstrap: /Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.0”,“iOSSDKVersion”:“8.0”,“deviceName”:“iPad Retina”,“platformVersion”:“8.0”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPad Retina (8.0 Simulator)’
info: [debug] Not setting device type since we’re using bundle ID and assuming app is already installed
info: [debug] Checking whether we need to set app preferences
info: [debug] Running ios sim reset flow
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] Cleaning sim data files
info: [debug] Executing: xcrun simctl erase E4F547DE-AB20-4235-A57F-412555C922D5
info: [debug] Cleaning mobile safari data files
warn: Applications directory /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/Caches/Snapshots/com.apple.mobilesafari
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/Caches/com.apple.mobilesafari/Cache.db*
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/Caches/com.apple.WebAppCache/.db
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/Safari/.plist
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/WebKit/LocalStorage/.
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/WebKit/GeolocationSites.plist
info: [debug] Deleting /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Library/Cookies/.binarycookies
info: [debug] Not setting locale
info: [debug] Setting iOS and app preferences
warn: Applications directory /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
info: [debug] Sim files for the 8.0 SDK do not yet exist, launching the sim to populate the applications and preference dirs
info: [debug] Not pre-launching simulator
info: On some xcode 6 platforms, instruments-without-delay does not work. If you experience this, you will need to re-run appium with the --native-instruments-lib flag
info: [debug] Preparing uiauto bootstrap
info: [debug] Dynamic bootstrap dir: /Users/valtech/Library/Application Support/appium/bootstrap
info: [debug] Dynamic env: {“nodePath”:“/usr/local/bin/node”,“commandProxyClientPath”:“/usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js”,“instrumentsSock”:“/tmp/instruments_sock”,“interKeyDelay”:null,“justLoopInfinitely”:false,“autoAcceptAlerts”:false}
info: [debug] Dynamic bootstrap code: // This file is automatically generated. D…ot manually modify!
info: [debug] Dynamic bootstrap path: /Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js
info: [debug] Reusing dynamic bootstrap: /Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js
info: [debug] Getting device string from opts: {“forceIphone”:false,“forceIpad”:false,“xcodeVersion”:“6.0”,“iOSSDKVersion”:“8.0”,“deviceName”:“iPad Retina”,“platformVersion”:“8.0”}
info: [debug] fixDevice is on
info: [debug] Final device string is: ‘iPad Retina (8.0 Simulator)’
info: Launching instruments briefly then killing it
info: [debug] Instruments is at: /Applications/Xcode6.app/Contents/Developer/usr/bin/instruments
info: [debug] Attempting to run app on iPad Retina (8.0 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode6.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w “iPad Retina (8.0 Simulator)” com.apple.mobilesafari -e UIASCRIPT “/Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] Checking condition to see if we should kill instruments
warn: Applications directory /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
info: [debug] We launched the simulator but the required dirs don’t yet exist. Waiting some more…
info: [debug] Checking condition to see if we should kill instruments
warn: Applications directory /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
info: [debug] We launched the simulator but the required dirs don’t yet exist. Waiting some more…
info: [debug] Checking condition to see if we should kill instruments
warn: Applications directory /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application doesn’t exist. Have you run this simulator before?
info: [debug] We launched the simulator but the required dirs don’t yet exist. Waiting some more…
info: [debug] Checking condition to see if we should kill instruments
info: [debug] We launched the simulator but the required dirs don’t yet exist. Waiting some more…
info: [debug] Checking condition to see if we should kill instruments
info: [debug] Condition passed, killing instruments and calling back
info: [debug] Killing the simulator process
info: [debug] Killall iOS Simulator
info: [debug] Killing any other simulator daemons
info: [debug] Setting javascript window opening to false
info: [debug] Setting fraudulent website warning to false
info: [debug] Updating settings for mobileSafari
info: [debug] Getting current settings for mobileSafari from /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application/AF16203D-485E-45D5-B028-2C50E5C20FB3/Library/Preferences/com.apple.mobilesafari.plist
warn: Settings file /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application/AF16203D-485E-45D5-B028-2C50E5C20FB3/Library/Preferences/com.apple.mobilesafari.plist did not exist
info: [debug] Writing settings for mobileSafari to /Users/valtech/Library/Developer/CoreSimulator/Devices/E4F547DE-AB20-4235-A57F-412555C922D5/data/Containers/Data/Application/AF16203D-485E-45D5-B028-2C50E5C20FB3/Library/Preferences/com.apple.mobilesafari.plist:
info: [debug] {“WebKitJavaScriptCanOpenWindowsAutomatically”:false,“WarnAboutFraudulentWebsites”:false}
info: [debug] Starting iOS 8. simulator log capture
info: [debug] Not pre-launching simulator
info: [debug] Not installing to real device since we’re on sim
info: [debug] Starting command proxy.
info: [debug] Instruments socket server started at /tmp/instruments_sock
info: [debug] Starting instruments
info: [debug] Instruments is at: /Applications/Xcode6.app/Contents/Developer/usr/bin/instruments
info: Launching instruments
info: [debug] Attempting to run app on iPad Retina (8.0 Simulator)
info: [debug] Spawning instruments with command: /Applications/Xcode6.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode6.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w “iPad Retina (8.0 Simulator)” com.apple.mobilesafari -e UIASCRIPT “/Users/valtech/Library/Application Support/appium/bootstrap/bootstrap-596362050ad3c71e.js” -e UIARESULTSPATH /tmp/appium-instruments
info: [debug] And extra without-delay env: {“DYLD_INSERT_LIBRARIES”:“/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6/InstrumentsShim.dylib”,“LIB_PATH”:“/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd6”}
info: [debug] And launch timeouts (in ms): {“global”:90000}
info: [debug] [INST] Waiting for device to boot…
info: Instruments is ready to receive commands
info: [debug] Instruments launched. Starting poll loop for new commands.
info: [debug] Setting bootstrap config keys/values
info: [debug] Pushing command to appium work queue: “target = $.target();\nau = $;\n$.isVerbose = true;\n”
info: [debug] Socket data received (2 bytes)
info: [debug] Socket data being routed.
info: [debug] Sending command to instruments: target = $.target();
au = $;
$.isVerbose = true;
info: [debug] Socket data received (27 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:true}
info: [debug] Setting initial orientation to PORTRAIT
info: [debug] Pushing command to appium work queue: “au.setScreenOrientation(‘PORTRAIT’)”
info: [debug] Sending command to instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: responding with:
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: Running system command #1: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:true}…
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: Got new command 1 from instruments: au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: evaluating au.setScreenOrientation(‘PORTRAIT’)
info: [debug] [INST] 2014-10-29 04:31:07 +0000 Debug: target.setDeviceOrientation(“1”)
info: [debug] [INST] 2014-10-29 04:31:08 +0000 Debug: evaluation finished
info: [debug] [INST] 2014-10-29 04:31:08 +0000 Debug: responding with:
info: [debug] [INST] 2014-10-29 04:31:08 +0000 Debug: Running system command #2: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{“status”:0,“value”:“PORTRAIT”}…
info: [debug] Socket data received (33 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:“PORTRAIT”}
info: [debug] Waiting for app source to contain elements
info: [debug] Pushing command to appium work queue: “au.mainApp().getTreeForXML()”
info: [debug] Sending command to instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2014-10-29 04:31:08 +0000 Debug: Got new command 2 from instruments: au.mainApp().getTreeForXML()
info: [debug] [INST] 2014-10-29 04:31:08 +0000 Debug: evaluating au.mainApp().getTreeForXML()
info: [debug] Socket data received (8192 bytes)
info: [debug] Socket data received (1474 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {“status”:0,“value”:{“UIAApplication”:{“@”:{“name”:“Safari”,“label”:“Safari”,“value”:null,“dom”:null,“enabled”:true,“valid”:true,“visible”:true,“hint”:null,“path”:“/0”,“x”:0,“y”:20,“width”:768,“height”:1004},“>”:[{“UIAWindow”:{“@”:{“name”:null,“label”:null,“value”:null,“dom”:null,“enabled”:true,"val
Please find the attached screenshots:
After manually clicking ignore this warning link navigates to some url like below screenshot
Please help me to resolve this issue.
Thanks,
Rsahmi