Hi Crosswalk-Project Team,

 

Thank you for a wonderful description of "CrossWalk Webdriver" at the link https://github.com/crosswalk-project/crosswalk-website/wiki/Crosswalk-WebDriver. To inform you, its really performance booster!!

 

Moving ahead, I have concern and would request your kind suggestion/solution.

 

I have a Hybrid application, and using cordova we are generating the apk for the Android platform. (by the command, cordova platform add android)

Once the APK is getting generated via cordova, I am further developing Automation test cases in C# via Visual Studio and taking the Automation server as Appium to launch this APK and start debugging.

 

After setting the Appium capabilities, I am passing it as one of the parameters for calling the Selenium Webdriver(code below), I am not able to get the main Window handler!!

 

During the first phase, the apk which did not had Cross walk implemented, we were getting the handle(for windowhandler - highlighted text).

But post crosswalk implementation(cordova-plugin-crosswalk-webview) into our Project(for better performance), the apk is not giving the handle.

 

Below is the piece of code for reference:

 

public class AndroidDriverExtension : DriverExtension

{

public AndroidDriverExtension(AndroidAppConfig appConfig)

{

this.driver = new RemoteWebDriver(

new Uri(appConfig.ServerAddress), CapabilitiesForAppiumServer(appConfig.APKPath, Constant.MachineName), Constant.INIT_TIMEOUT_SEC);

this.mainWindowHandler = this.driver.CurrentWindowHandle;

}

 

/// <summary>

/// Get capabilities of appium for run android test on device

/// </summary>

/// <returns></returns>

private DesiredCapabilities CapabilitiesForAppiumServer(string apkPath, string deviceName)

{

//Set up app capabilities

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.SetCapability("deviceName", deviceName);

capabilities.SetCapability("platformName", "Android");

capabilities.SetCapability("autoWebview", "true");

capabilities.SetCapability("apppackage", "com.test.testapp");

capabilities.SetCapability("appActivity", "com.test.testapp.MyApp");

capabilities.SetCapability("app", apkPath);

return capabilities;

}

 

Log snapshots for reference:

 

- CurrentWindowHandle '((MyAppFramework.DriverExtension)(this)).CurrentWindowHandle' threw an exception of type 'System.NullReferenceException' string {System.NullReferenceException}

 

- CurrentWindowHandle '((MyAppFramework.DriverExtension)(this)).CurrentWindowHandle' threw an exception of type 'System.NotImplementedException' string {System.NotImplementedException}

 

- Message "Not yet implemented. Please help us: http://appium.io/get-involved.html"

Please let me know if you need some more details.

Your help would be greatly appreciated!!

 

Thanks & Regards,

Saurabh Nigam

India



::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------

_______________________________________________
Crosswalk-dev mailing list
Crosswalk-dev@lists.crosswalk-project.org
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to