hamsterksu / appium-xwalk

supports crosswalk webdriver in appium framework
0 stars 1 forks source link

[NO ISSUE] Need support please #1

Open aorfevre opened 8 years ago

aorfevre commented 8 years ago

Hi @hamsterksu ,

First of all, thank you for having that package ready for us.

I have successfully started my Docker Container and I can start my .apk with the appium container.

However, I can't access to my WEBVIEW.

I'm coding my tests in Java JUNIT tests I have this function to set the contect to WEBVIEW.

public static void setContext(String v) throws Exception {
              try {

            Set<String> contextNames = driver.getContextHandles();

            for (String contextName : contextNames) {
                System.out.println("setContext ENTER" + contextName);
                if (contextName.contains(v)) {
                    System.out.println("setContext " + contextName);
                    driver.context(contextName);

                }
            }
        } catch (Exception e) {
            System.out.println("setContext error " + e);
            throw e;
        }

    }

I do not have any webview context available., only NATIVE_APP.

I assume that I have to add some more capabilities to make appium work with XWalk but I can't find any clue on what setup I should us.

Any help will be very much appreciated,

Thanks for support !

hamsterksu commented 8 years ago

hi @aorfevre could you try to add androidDeviceSocket with value <pakagename>_devtools_remote

aorfevre commented 8 years ago

hi @hamsterksu ,

Thank you for your fast reply. I tried adding capabilities.setCapability("androidDeviceSocket",myPackage+"_devtools_remote");

I still can see only NATIVE_APP Context

aorfevre commented 8 years ago

How did you configured your test on your Cordova XWalk project ? Can you share me a piece of your code, even if it is not on JUnit.

Thanks for support

aorfevre commented 8 years ago

I don't know what I did, but I do see know CHROMIUM Context ! I'll try with that ;)

hamsterksu commented 8 years ago

i suppose you have restarted container or apium server

aorfevre commented 8 years ago

Changing to CHROMIUM Context shall be enough for me to be able to perform my tests as I do on a non XWalk project ? I can't yet select one of my elements but I'll dig on that. I'm closer to success ;)

hamsterksu commented 8 years ago

to provide --session-override arguments for appium server please use the following command

docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb -e appium_args=" -p 4723 --chromedriver-executable=/opt/xwalkdriver/xwalkdriver64_xwalk_15 --session-override" -p 4723:4723 hamsterksu/appium-xwalk
hamsterksu commented 8 years ago

seems yes, you just need to switch to CHROMIUM context. but i don't have a lot of experience with appium i just created docker container with some fixes for our qa engineer

hamsterksu commented 8 years ago

@aorfevre which kind of driver do you use in code? we used - RemoteWebdriver

aorfevre commented 8 years ago

I used AndroidDriver but I will try with RemoteWebDriver

hamsterksu commented 8 years ago

@aorfevre for RemoteWebDriver you can specify host and port