Forum Xamarin Xamarin.Android

Bug caused by the changes from Androiod 9.0 above in the WebView

Hi All , i really need your help . The new Android Version of 9.0.1 made a lot of changes to the WebView , which makes a lot of problems to my automation tests.
I have checked on several different devices , if the Android Version is bellow 9, the automation tests works perfectly fine. I will post screenshots and parts of my code plus the REPL , to see what is going on.
I have simple login automated script :

        app.WaitForElement(x => x.Css("input#username"), "Timeout waiting for username input", TimeSpan.FromSeconds(30));
        app.Tap(x => x.Css("input#username"));
        app.EnterText(x => x.Css("input#username"), user.Email); // - I take the email as a var from a class as well as the password. 

        app.WaitForElement(x => x.Css("input#password"));
        app.Tap(x => x.Css("input#password"));
        app.EnterText(x => x.Css("input#password"), user.Password);~~~~

Here is the REPL result :

[[object CalabashRootView] > ... > LinearLayout]
  [FrameLayout] id: "content"
    [LinearLayout] id: "root"
      [LinearLayout] id: "top_nav_container"
        [RelativeLayout] id: "navbar_bg"
          [LinearLayout > ImageView] id: "btn_back"
      [FrameLayout > PlatformRenderer] id: "fragment_frame_layout"
        [PageRenderer > ... > WebViewRenderer] id: "NoResourceEntry-10"
          [WebView] id: "NoResourceEntry-11"
            [dom] text: "CfDJ8N4BDiWgPnVAq674FL6Cim4zERUByKDSCNBI-X3hz7pBERZaK1m25khNK0xFWcJZWXFT6tsLhQpfX2DwKaOmSpp8-rRSLDaNoXvdQ3GjvDb0o3Zr--VVkocB5po03BCbfvin4hamgRbbL4BvpyaQnNU"
            [dom] id: "username"
            [dom] id: "password"
            [dom] id: "rememberMe" text: "true"
            [dom] text: "Login"
            [dom] id: "current-language"

And when i Query the "Login"
app.Query(x => x.WebView().Css("input#username"));
Query for WebView().Css("input#username") gave 1 results.

            Id => "username",
            NodeType => "ELEMENT_NODE",
            NodeName => "INPUT",
            Class => "login-input input-style ng-pristine ng-untouched ng-valid ng-empty ng-valid-email ng-valid-maxlength",
            Html => "<input type="email" class="login-input input-style ng-pristine ng-untouched ng-valid ng-empty ng-valid-email ng-valid-maxlength" placeholder="Email" name="username" autofocus="" id="username" ng-model="model.username" ng-maxlength="128" move-to-next-form-field="password" autocorrect="off" autocapitalize="off" spellcheck="false">",
            Value => null,
            WebView => "NoResourceEntry-11",
            TextContent => "",
            Rect => {
                Width => 1044,
                Height => 114,
                CenterX => 540,
                CenterY => 1106,
                Top => 259,
                Bottom => 0,
                Left => 6,
                Right => 0,
                X => 18,
                Y => 1049

The Text Goes Above the "username" input , but the Tap, Select and e.t works perfectly fine

Sign In or Register to comment.