Can anyone tell me the steps to run Appium on real iPhone device
I have downloaded Appium 1.4
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformVersion", "8.1.2");
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("device", "iPhone");
capabilities.setCapability("deviceName", "Maitri acharya");
//capabilities.setCapability("browserName", "safari");
String path = System.getProperty("user.dir")+"/UICatalog.app";
System.out.println(path);
File app = new File(path);
capabilities.setCapability("app", app.getAbsolutePath());
driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
I have set up bundleID and UDID defined in Appium setting
I came across few links about cloning Safari launcher and as ios-webkit-debug-proxy-launcher.js but I am not still clear on steps...
Thanks in advance
I get following error
: setupDesireCapabilitiesMobile
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: ENOENT, stat '/Applications/Appium.app/Contents/Resources/node_modules/appium/build/SafariLauncher/SafariLauncher.zip') (WARNING: The server did not provide any stacktrace information)
Comman
I know it was a month ago you posted but hopefully I can help someone else. I got the same error today. It turned out there was no SafariLauncher.zip on that path.
I solved it by downloading SafariLauncher from github: https://github.com/budhash/SafariLauncher
Then running the script in build.sh from the terminal, which creates a SafariLauncher.zip file. An then adding this zip file in the correct place.
I found this answer here: https://discuss.appium.io/t/error-installing-safari-launcher-on-real-device-appium-v1-3-7/3793
Do you test on real device? Did you unlock Web Inspector in:
your iPhone -> Settings -> Safari -> Advanced -> Web Inspector: on ?
I was able to get over this error executing the following in the Appium folder:
./reset.sh --ios --real-safari
This was explained on this bug report: https://github.com/appium/appium-dot-app/issues/513
Related
I'm automating a web app in chrome browser in Android Mobile. I've ADV with version 7.0
I'm trying to send user name for login using below code -
driver = new AppiumDriver<WebElement>(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
driver.get("https://site-url/");
driver.findElement(By.id("email")).sendKeys("myemailid#gmail.com")
It throws below exception -
Exception in thread "main" org.openqa.selenium.WebDriverException:
unknown error: call function result missing 'value' (Session info:
chrome=71.0.3578.99) (Driver info: chromedriver=2.33.506120
(e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT
10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds
Note: please don't mark it as duplicate. solution from below references are not working for me.
org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value'
Selenium WebDriverException: unknown error: call function result missing 'value' while calling sendkeys method
I'm using latest chrome version i.e. 71 and chromedriver 2.45 . It doesn't seems a compatibility issue.
Observation : chromedriver version 2.45 used to set property but it shows chromedriver=2.33.506120 in exception
I want to make it comment but to make it clear I write it here. Yes it duplicate above post, see the log
(Session info: chrome=71.0.3578.99)
(Driver info: chromedriver=2.33.506120
You are using chromedriver 2.33 that for Chrome v60-62 then
I'm using latest chrome version i.e. 61 and chromedriver 2.45 . It
doesn't seems a compatibility issue.
ChromeDriver 2.45 is for Chrome v70-72
solution: see download page for other compatibility and download
This seems default Appium's chromedriver.exe issue in my case as it was taking chromedriver=2.33.506120 by default even i have set 2.45 version. following workaround resolved my issue.
Prerequisites
Should have compatible chromedriver.exe version with the chrome version installed in device/emulator
setting chromedriver.exe path in Appium using
System.setProperty("webdriver.chrome.driver",
"D:\\Eclipse\\chromedriver.exe"); won't work
Use following ways to set chromedriver path in Appium:
Using DesiredCapabilities e.g.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("deviceName", "emulator-5554 (9)");
capabilities.setCapability("platformVersion", "9");
capabilities.setCapability("browserName", "Chrome");
capabilities.setCapability("noReset", true);
capabilities.setCapability("chromedriverExecutable", "D:\\chromedriver_win32_2.45\\chromedriver.exe");
Provide chromedriver.exe path while start Appium Server. Refer below snap
I am working on Appium-Java maven driven framework and getting below error for Android Capabilities
reference to setCapability is ambiguous
[ERROR] both method
setCapability(java.lang.String,java.lang.String) in
org.openqa.selenium.MutableCapabilities and method
setCapability(java.lang.String,org.openqa.selenium.Platform) in
org.openqa.selenium.MutableCapabilities match
Versions:
Selenium Version:<selenium.java.version>3.11.0</selenium.java.version> [Also tried with 3.141.59, 3.12.0, 3.7.1]
And Appium version:
<appium.java-client.version>6.1.0</appium.java-client.version>
Code Snippet:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", JsonPath.read(jsonFile, "$." + "platformName"));
Typecasting Output from JsonPath.read , to String resolved the issue.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", (String) JsonPath.read(jsonFile, "$." + "platformName"));
I'm new to ios appium and trying to use appium for app testing which i did not have the source code nor ios developer account, the app is downloaded from crashlytics.
I've tried to modify the certificate for webdriveragent with my personal account but failed. And i saw the document from appium that i should able to use appium with only "app" or "bundleid" capability so i tried to remove the "app" then got another err.
Please advise, thank you in advance.
My capabilities set as below
capabilities['platformName'] = 'iOS'
capabilities['automationName'] = 'XCUITest'
capabilities['platformVersion'] = '11.4'
capabilities['deviceName'] = 'iPhone X'
capabilities['udid'] = 'my phone'
capabilities['bindleId'] = 'app.bundleId'
capabilities['app'] = '/pathtomyapp'
Appium log output
selenium.common.exceptions.WebDriverException An unknown server-side
error occurred while processing the command. Original error: Unable to
launch WebDriverAgent because of xcodebuild failure: "xcodebuild
failed with code 65".
If I remove the "app" from capablities then I get following error
selenium.common.exceptions.WebDriverException: Message: An unknown
server-side error occurred while processing the command. Original
error: The desired capabilities must include either an app or a
bundleId for iOS
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
a very comprehensive tutorial how to deal with your problem, you are missing
desired_caps['xcodeOrgId'] = 'YOURDEVID'
desired_caps['xcodeSigningId'] = "iPhone Developer"
I believe that this error normally happens because the wda is in the wrong directory. Which version of appium is this? If it's above 1.7.2 then you'll need to add the capabilities usePrebuiltWDA set to true and derivedDataPath set to the path of the derived data folder of the wda.
https://github.com/appium/appium-xcuitest-driver/blob/master/README.md
Hth
James
I am running on Appium 1.7.2 and using a iPhone 6s on 11.2.5 OS. I am trying to create a simple test to target a real iOS device vs a simulator but each time I run the code Appium/xCode will open a simulator and use that instead of the real device.
How do I get appium to use the real device. I have tried supplying the UUID of the device without luck.
Thank you,
Gradle
compile group: 'io.appium', name: 'java-client', version:'6.0.0-BETA2'
compile group: 'org.seleniumhq.selenium', name: 'selenium-server', version:'3.8.1'
compile group: 'org.seleniumhq.selenium', name: 'selenium-remote-driver', version:'3.8.1'
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:'3.8.1'
Java Code
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName", "iOS");
capabilities.setCapability("deviceName", "iPhone 6s");
capabilities.setCapability("platformVersion", "11.2");
//capabilities.setCapability("app", "https://s3.amazonaws.com/appium/TestApp8.4.app.zip");
capabilities.setCapability("browserName", "Safari");
capabilities.setCapability("uuid", "26deaa8eb5003b3d56a561ada2fcff2174b00df1");
capabilities.setCapability("deviceOrientation", "portrait");
capabilities.setCapability("browserName", "safari");
capabilities.setCapability("automationName", "XCUITest");
If you want to run Appium/XCUITest on real device, follow this guideline
The reason why appium takes simulator is that you did not provide xcodeOrgId & xcodeSigningId capabilities:
{
"xcodeOrgId": "<Team ID in apple dev account>",
"xcodeSigningId": "iPhone Developer"
}
You might face XCUITest xcodebuild exited with code '65', so follow the guide/search on stackoverflow how to fix setup manually.
Good luck!
To test ios real devices , below capabilities are required
app=${app}
version=${version}
platform=${platform}
deviceName=${deviceName}
udid=${udid}
platformName=${platformName}
newCommandTimeout=2500
name=${name}
automationName=${automationName}
xcodeOrgId=${xcodeOrgId}
xcodeSigningId=${xcodeSigningId}
usePrebuiltWDA=${usePrebuiltWDA}
Platform compatibility :
Mac OS X 10.10 or higher, 10.11.1 recommended **[Using 10.10.5]**
XCode >= 6.0, 7.1.1 recommended **[Using 7]**
Apple Developer Tools (iPhone simulator SDK, command line tools)
Appium Server **[Using v1.5.3]**
Node.js **[Using V4.5.0]**
Don't actually know which is the perfect combination of all the SDK/requirements for configuring the Appium in MAC system.
And getting an error in Appium logcat:
Unable to load node configuration file to register with grid.
My code is
#BeforeTest
public void preSetup() throws MalformedURLException{
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
File f=new File("/Users/nandini/Documents/AppiumWorkSpace/One20Automation/app/One20.app");
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 6");
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "9.0");
desiredCapabilities.setCapability("udid", "E1791000-5BC8-4741-A1AC-416FDEEB3048");
desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM, "MAC");
desiredCapabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "Safari");
desiredCapabilities.setCapability(MobileCapabilityType.APP, f.getAbsolutePath());
driver=new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"), desiredCapabilities);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
Note: Actually app is getting installed but not lunching the app and further work.Also by code simulator is appearing in screen, but after sometimes automatically closing it.
Please suggest.