32
32
public class GetHandler extends BaseWebCommandHandler {
33
33
34
34
// TODO freynaud cached by session.
35
- private static UIAElement addressBar ;
36
- private static final boolean nativeEvents = false ;
35
+ private UIAElement addressBar ;
36
+ private static final boolean nativeEvents = true ;
37
37
38
38
public GetHandler (IOSDriver driver , WebDriverLikeRequest request ) {
39
39
super (driver , request );
@@ -45,8 +45,8 @@ public JSONObject configurationDescription() throws JSONException {
45
45
desc .put (
46
46
"nativeEvents" ,
47
47
"{boolean}, default to "
48
- + nativeEvents
49
- + ".true = UIAutomation native events will be used to enter the URL (slow) , Web = WebKit remote debugging will be used.Faster." );
48
+ + nativeEvents
49
+ + ".true = UIAutomation native events will be used to enter the URL (slow) , Web = WebKit remote debugging will be used.Faster." );
50
50
return desc ;
51
51
}
52
52
@@ -93,11 +93,10 @@ public Response handle() throws Exception {
93
93
}
94
94
95
95
private UIAElement getAddressBar () {
96
- if (addressBar == null ) {
97
- Criteria urlAddressBar = new AndCriteria (new TypeCriteria (UIAElement .class ), new ValueCriteria (
98
- "Go to this address" ));
99
- addressBar = getSession ().getNativeDriver ().findElement (urlAddressBar );
100
- }
96
+
97
+ Criteria urlAddressBar = new AndCriteria (new TypeCriteria (UIAElement .class ), new ValueCriteria (
98
+ "Go to this address" ));
99
+ addressBar = getSession ().getNativeDriver ().findElement (urlAddressBar );
101
100
return addressBar ;
102
101
}
103
102
@@ -108,7 +107,7 @@ private void typeURLNative(String url) {
108
107
109
108
getSession ().setMode (WorkingMode .Native );
110
109
getAddressBar ().tap ();
111
- RemoteUIAKeyboard keyboard = (RemoteUIAKeyboard )getSession ().getNativeDriver ().getKeyboard ();
110
+ RemoteUIAKeyboard keyboard = (RemoteUIAKeyboard ) getSession ().getNativeDriver ().getKeyboard ();
112
111
keyboard .sendKeys (url );
113
112
keyboard .findElement (new NameCriteria ("Go" )).tap ();
114
113
0 commit comments