3232public  class  GetHandler  extends  BaseWebCommandHandler  {
3333
3434  // 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 ;
3737
3838  public  GetHandler (IOSDriver  driver , WebDriverLikeRequest  request ) {
3939    super (driver , request );
@@ -45,8 +45,8 @@ public JSONObject configurationDescription() throws JSONException {
4545    desc .put (
4646        "nativeEvents" ,
4747        "{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." );
5050    return  desc ;
5151  }
5252
@@ -93,11 +93,10 @@ public Response handle() throws Exception {
9393  }
9494
9595  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 );
101100    return  addressBar ;
102101  }
103102
@@ -108,7 +107,7 @@ private void typeURLNative(String url) {
108107
109108      getSession ().setMode (WorkingMode .Native );
110109      getAddressBar ().tap ();
111-       RemoteUIAKeyboard  keyboard  = (RemoteUIAKeyboard )getSession ().getNativeDriver ().getKeyboard ();
110+       RemoteUIAKeyboard  keyboard  = (RemoteUIAKeyboard )  getSession ().getNativeDriver ().getKeyboard ();
112111      keyboard .sendKeys (url );
113112      keyboard .findElement (new  NameCriteria ("Go" )).tap ();
114113
0 commit comments