Skip to content

Commit f51e754

Browse files
authored
minimize (#9)
1 parent 8201527 commit f51e754

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

java-data/selendroid/problems/api-related/1/correct-usages/DefaultSelendroidDriver.java

+1-22
Original file line numberDiff line numberDiff line change
@@ -55,31 +55,10 @@
5555
public class DefaultSelendroidDriver implements SelendroidDriver {
5656

5757
public String initializeSession(JSONObject desiredCapabilities) {
58-
if (this.session != null) {
59-
session.getKnownElements().clear();
60-
return session.getSessionId();
61-
}
62-
activeWindowType = WindowType.NATIVE_APP.name();
58+
6359
Random random = new Random();
6460
this.session = new Session(desiredCapabilities,
6561
new UUID(random.nextLong(), random.nextLong()).toString());
66-
nativeSearchScope =
67-
new NativeSearchScope(serverInstrumentation, getSession().getKnownElements());
68-
69-
selendroidNativeDriver =
70-
new SelendroidNativeDriver(serverInstrumentation, (NativeSearchScope) nativeSearchScope);
71-
SelendroidLogger.log("new s: " + session.getSessionId());
72-
73-
nativeExecuteScriptMap.put("invokeMenuActionSync", new InvokeMenuAction(session,
74-
serverInstrumentation));
75-
nativeExecuteScriptMap.put("findRId", new FindRId(serverInstrumentation));
76-
nativeExecuteScriptMap.put("getL10nKeyTranslation", new GetL10nKeyTranslation(
77-
serverInstrumentation));
78-
nativeExecuteScriptMap.put("findElementByAndroidTag",
79-
new FindElementByAndroidTag(session.getKnownElements(), serverInstrumentation, keySender));
80-
nativeExecuteScriptMap.put("isElementDisplayedInViewport", new IsElementDisplayedInViewport(
81-
session.getKnownElements(), serverInstrumentation));
82-
8362
return session.getSessionId();
8463
}
8564

0 commit comments

Comments
 (0)