I am using appium studio on windows to automate an app on iPhone.
When I am using bundle id its not working but when I am giving the app location xpath and clicking on it, it is launching the application.
Please help me to launch the application using bundle id.
DesiredCapabilities dCapabilities=new DesiredCapabilities();
URL url = new URL("http://localhost:5555/wd/hub");
dCapabilities.setCapability("reportDirectory","report");
dCapabilities.setCapability("fullReset", false);
dCapabilities.setCapability("reportFormat", "xml");
dCapabilities.setCapability("testName", "SampleTest");
dCapabilities.setCapability(IOSMobileCapabilityType.BUNDLE_ID,"au.com.chat.chatapp");
dCapabilities.setCapability(IOSMobileCapabilityType.LOCATION_SERVICES_AUTHORIZED,"true");
dCapabilities.setCapability(MobileCapabilityType.UDID, "00008020-00065C813E12002E");
driver = new IOSDriver<MobileElement>(url,dCapabilities);
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: session not created (An unknown server-side error occurred. status='false'. Failed to complete internal method: 'launch args: [au.com.chat.chatapp, false, true]', details: Failed to launch activity / URL. The application: au.com.chat.chatapp is not installed on the device (reportUrl=C:\Users\system name\appiumstudio-reports\report\test25)) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6.67 seconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: '10263TAB', ip: '10.10.32.60', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221'
Driver info: driver.version: IOSDriver
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
It worked, I corrected the bundle id .
Related
I've been trying to find a solution to this specific problem online all day. Let me provide as much information as I can.
I am using selenium grid 3, with windows server as the hub and my macbook as the node
Everything works as it should on the mac in chrome and firefox.
I took care of the setup in safari as expected (developer, allow automations, and then ran that safaridriver command on /usr/local/bin safaridriver (whatever that was))
When I set the browser to safari, it opens up as it should. The hub and node are properly configured to communicate.
My macbook is connected by HDMI to an HP 24 inch monitor.
When the the grid opens safari in the HP monitor, after it applies the driver.manage().window().maximize(), it shows 8 elements on the screen. Automation fails after that 8th element - It will not scroll past it at all.
When the grid opens safari in the macbook screen ("built-in retina display"), , after it applies the driver.manage().window().maximize(), it shows 4 elements on the screen. It scrolls once and shows the next 7 elements. But once it gets to that 7th element, automation fails. The error I get is:
org.openqa.selenium.WebDriverException:
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: '[redacted]', ip: '[redacted]', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '1.8.0_71'
Driver info: driver.version: unknown
Command duration or timeout: 78 milliseconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: '[redacted]', ip: '[redacted]', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_271'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{safari:diagnose=false, strictFileInteractability=false, platform=ANY, safari:automaticProfiling=false, webdriver.remote.sessionid=9834B185-E31A-4433-8F7F-0E035C280406, safari:platformBuildVersion=19F101, webkit:WebRTC={DisableICECandidateFiltering=false, DisableInsecureMediaCapture=false}, browserVersion=13.1.1, safari:useSimulator=false, acceptInsecureCerts=false, safari:platformVersion=10.15.5, browserName=Safari, safari:automaticInspection=false, platformName=macOS, setWindowRect=true}]
Session ID: 9834B185-E31A-4433-8F7F-0E035C280406
Is there anything in there that tells anyone what the issue is? I can't figure it out. I've tried adding scrolls, but I don't think I should have to for just this one browser, should I? There must be some configuration I could adjust? I tried removing the HDMI and using just the macbook itself, nothing I have tried works.
If anyone knows anything that could help, I'd appreciate it!
Though your Selenium version is 3.141.59 but your JDK version 1.8.0_71 is too old and ancient.
System info: host: '[redacted]', ip: '[redacted]', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '1.8.0_71'
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u271.
This question already has answers here:
SessionNotCreatedException: Message: session not created from disconnected: unable to connect to renderer with ChromeDriver 2.45 Chrome v71
(6 answers)
Closed 3 years ago.
Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217-refs/branch-heads/3865#{#442}) on port 14991
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
[1573970978.437][SEVERE]: Unable to receive message from renderer
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created
from disconnected: Unable to receive message from renderer
(Session info: chrome=77.0.3865.120)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'DESKTOP-JCFLT7B', ip: '192.168.1.107', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.2'
Driver info: driver.version: ChromeDriver
This issue is occurs because your chrome browser version is not compatible with the chrome driver version. Check your chrome browser version and then install chrome driver from the below location based on your os.
https://chromedriver.chromium.org/downloads
for e.g:
I am using Version 78.0.3904.97 (Official Build) (64-bit) with windows and currently using chromedriver_win32.zip
I am writing automated test cases for a hybrid Android app using Appium.
I am using below line of code to set the cursor on a drop-down/pop-up:
Set<String> stringSet = webDriver.getWindowHandles();
However, this gives below error as:
org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented.
webdriver is the object of AppiumDriver.
This is a Hybrid(Cordova) Mobile App.
My stack trace:
Apr 03, 2019 4:20:21 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown method' (405 expected)
org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'VIKSHAH-M-F1AR', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_152-release'
Driver info: io.appium.java_client.AppiumDriver
Update:
After Updating the JDK
Apr 10, 2019 12:47:45 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown method' (405 expected)
org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'VIKSHAH2-M-F1AR', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_202'
Driver info: io.appium.java_client.android.AndroidDriver
Has anyone faced similar issue?
Is there any other way to test drop down using Appium?
This error message...
org.openqa.selenium.remote.ErrorCodes toStatus INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown method' (405 expected)
org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'VIKSHAH-M-F1AR', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_152-release' Driver info: io.appium.java_client.AppiumDriver
...implies that the WebDriver variant was unable to interact with the desired WebElement(s).
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Your Selenium Client version is 3.141.59 of 2018-11-14T08:17:03 which is a recent release.
Your JDK version is 1.8.0_152-release which is pretty old and ancient.
So there is a clear mismatch between the Selenium Client v3.141.59 and JDK v1.8.0_152-release.
Solution
Upgrade JDK to current levels JDK 8u202.
Have you enabled setWebContentsDebuggingEnabled property? There is an additional step necessary within your app build, unfortunately. As described in the Android remote debugging docs it is necessary to set to true the setWebContentsDebuggingEnabled property on the android.webkit.WebView element.
If not yet enabled, ask the developers to set to true before generating the build.
Below is the code that I use to switch to the first web view (non-native view) from available contexts. If you're not sure what the context texts actually contain, then write code to capture the array and display all the values.
#Nullable
private String getWebContext() {
ArrayList<String> contexts = new ArrayList<String>(driver.getContextHandles());
for (String context : contexts) {
if (!context.equals("NATIVE_APP")) {
return context;
}
}
return null;
}
Seem to be getting this error waiting for popup window. As I am watching the script execute the js button executes and popup window does open but my test fails with the following error:
org.openqa.selenium.WebDriverException: disconnected: received Inspector.detached event
(Session info: chrome=56.0.2924.87)
(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 3.20 seconds
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: '*******', ip: '*******', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.28.455520
This is about chrome issue(https://bugs.chromium.org/p/chromedriver/issues/detail?id=1194).
When you are running selenium program, you cannot press F12 to open dev tools manually, or it'll throw this exception sometimes. You can browse this chrome driver official page.
According to the issue list, it looks like fixed, but I still meet this bug in ChromeDriver 2.29.
Try updating your Chrome, I can see that your chromedriver version is 2.28 which is the most recent release and it should support Chrome v55-77, but updating Chrome might be a solution.
I have a selenium code that uses chromedriver in windows. I have set the chromedriver using following:
ChromeDriverManager.getInstance().setup();
When i execute it in Windows, It works fine.
But when i create a jar for my code and execute it in unix using (java -cp xyz.jar classname). I get following error:
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
System info: host: 'sample.home.com', ip: '10.1.30.207', os.name: 'Linux', os.arch: 'amd64', os.version: '3.14.35-28.38.amzn1.x86_64', java.version: '1.7.0_75'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:171)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:160)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:117)
at com.snapdeal.hadoop.monitoring.hdfs_monitoring.HadoopM.main(HadoopM.java:68)
Can someone please confirm what changes should be done in my script so that it can be run on unix machine?