[ 
https://issues.apache.org/jira/browse/CB-8080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275837#comment-14275837
 ] 

Andrea Tino commented on CB-8080:
---------------------------------

Ok Andrew thanks for the hints. I will try to inspect communications between 
the native layer and the webview, however I have not much time for this and we 
are in the real urge for a fix. Since we are not the only one experiencing this 
issue after migrating to the new version of Cordova, can you tell me whether 
the Cordova Team is planning on working on this bug or not?

Even if I successfully assess that ChromeDriver commands are not being 
correctly routed to the webview, I would not know how to find a correct fix for 
the issue without breaking other areas.

Regarding your suggestion about the possibility to deactivate the security 
feature in case ChromeDriver is detected: I do not think that would be a proper 
fix. Since we are dealing with security we would need a way to authenticate 
ChromeDriver; however in case we successfully do that, we might lose proper app 
feature coverage in our tests since a part of the usual behavior of the webview 
would be disabled while testing and a breaking feature we introduce might not 
get caught because of this.

Is there any chance you will be working on this in the next days/weeks 
according to your development planning? Thank you.

> After migrating to 3.6.3 from 3.4.0, Appium (Android) tests fail because of 
> open dialog
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-8080
>                 URL: https://issues.apache.org/jira/browse/CB-8080
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CordovaJS
>    Affects Versions: 3.6.3
>         Environment: Basic Appium test on Android webview based app. The test 
> on Appium works until the app issues a `window.location.reload()` or a 
> `window.location.href = 'something'`.
>            Reporter: Andrea Tino
>              Labels: javascript
>         Attachments: MyApp-debug.apk
>
>
> After upgrading to Cordova 3.6.3 from Cordova 3.4.0; my Appium tests cannot 
> go on because of a strange error. The error can be reproed very easily by 
> creating a basic web-view based app on Android which issues a 
> {{window.location.reload()}} after a while that the test starts.
> I could assess that the problem is one particular file: {{cordova.js}} which 
> becomes part of the js files in my app when I build it with Cordova. My app 
> loads only one javascript file: {{cordova.js}}, I removed all other 
> dependencies to other js files. When that file is in my app (even though 
> {{index.html}} does not use any function defined in there), my tests fails. 
> If I remove the dependencies to that file, tests go ok!
> The problem is that when my app issues a {{window.location.reload()}}; my 
> test fail with this error message:
> {code}
> info: [debug] Responding to client with error: 
> {"status":26,"value":{"message":"A modal dialog was open, blocking this 
> operation","origValue":"unexpected alert open\n (Session info: webview=)\n 
> (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 
> x86_64)"},"sessionId":"965ba51e54f682559e5b8378095bc3d4"}
> {code}
> *Test*
> The APK to repro this is in attachments. It is possible to run a simple 
> Appium test to repro the problem:
> {code}
> [Test]
>         public void SimpleTest()
>         {
>             this.appPackage = "com.myorg.myapp";
>             this.appActivity = "myapp";
>             BeforeAll();
>             Thread.Sleep(3000);
>             var submitAddressButton = 
> driver.FindElementByClassName("testClass");
>             submitAddressButton.Click();
>             Thread.Sleep(3000);
>             submitAddressButton = driver.FindElementByClassName("testClass");
>             Expect(submitAddressButton, Is.Not.Null);
>         }
> {code}
> *Important*
> The fact that a dialog is reported is actually very strange. After inspecting 
> a lot I could verify that no native/webview dialog is being shown on my app. 
> In fact I cannot see any dialog and if I try to dismiss this ghost dialog 
> using Appium and WebDriver APIs, the command fail as no dialog can be found.
> *Notes*
> Consider that the problem is not in the APIs I use in my test (C# dotnet 
> driver for Appium). Everything happens on my Appium server running on a Mac.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to