Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/io/appium/java_client/AppiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,8 @@ public URL getRemoteAddress() {
* @return a map with values that hold session details.
*
*/
public Map<String, String> getSessionDetails() {
public Map<String, Object> getSessionDetails() {
Response response = execute(GET_SESSION);
return (Map<String, String>) response.getValue();
return (Map<String, Object>) response.getValue();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;


import io.appium.java_client.AppiumSetting;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
Expand All @@ -30,6 +30,7 @@
import org.openqa.selenium.html5.Location;

import java.io.File;
import java.util.Map;

public class AndroidDriverTest extends BaseAndroidTest {

Expand Down Expand Up @@ -138,7 +139,12 @@ public class AndroidDriverTest extends BaseAndroidTest {
}

@Test public void getDeviceUDIDTest() {
String deviceSerial = driver.getSessionDetails().get("deviceUDID");
String deviceSerial = driver.getSessionDetails().get("deviceUDID").toString();
assertNotNull(deviceSerial);
}

@Test public void getSessionMapData() {
Map<?,?> map = (Map<?, ?>) driver.getSessionDetails().get("desired");
assertNotEquals(map.size(), 0);
}
}