This is an automated email from the ASF dual-hosted git repository. aharui pushed a commit to branch feature/MXRoyale in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 48e9ec6bbc801830c28db3c0c81ade3e7c0fe8d8 Author: Alex Harui <[email protected]> AuthorDate: Wed Mar 28 13:06:19 2018 -0700 fix how we find the root now that mx:Application is not the body --- mustella/src/main/java/marmotinni/TestStep.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mustella/src/main/java/marmotinni/TestStep.java b/mustella/src/main/java/marmotinni/TestStep.java index e0c07c6..9ee9023 100644 --- a/mustella/src/main/java/marmotinni/TestStep.java +++ b/mustella/src/main/java/marmotinni/TestStep.java @@ -102,9 +102,13 @@ public class TestStep { protected void insertTargetScript(StringBuilder sb, String target) { sb.append("var target = document.getElementsByTagName('body')[0];"); - sb.append("target = target.royale_wrapper;"); - sb.append("if (target.initialView)"); - sb.append(" target = target.initialView;"); + sb.append("if (target.royale_wrapper) {"); + sb.append(" target = target.royale_wrapper;"); + sb.append(" if (target.initialView)"); + sb.append(" target = target.initialView;}"); + sb.append("else {"); + sb.append(" target = document.getElementsByClassName('Application')[0];"); + sb.append(" target = target.royale_wrapper;}"); if (target == null || target.length() == 0) { return; -- To stop receiving notification emails like this one, please contact [email protected].
